;; sample-heat.dai
;;
;; This file print a tab-seperated table containing heat capacity and
;; conductivity of Danish soil types, at saturated water content,
;; field capacity, and wilting point.

(input file "dk-horizon.dai")

(defprogram main write
  (declare ap1_sat_cap string "")
  (ap1_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB1") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap1_sat_con string "")
  (ap1_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB1") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap1_fc_cap string "")
  (ap1_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB1") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap1_fc_con string "")
  (ap1_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB1") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap1_wp_cap string "")
  (ap1_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB1") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap1_wp_con string "")
  (ap1_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB1") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap2_sat_cap string "")
  (ap2_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB2") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap2_sat_con string "")
  (ap2_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB2") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap2_fc_cap string "")
  (ap2_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB2") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap2_fc_con string "")
  (ap2_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB2") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap2_wp_cap string "")
  (ap2_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB2") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap2_wp_con string "")
  (ap2_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB2") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap3_sat_cap string "")
  (ap3_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB3") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap3_sat_con string "")
  (ap3_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB3") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap3_fc_cap string "")
  (ap3_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB3") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap3_fc_con string "")
  (ap3_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB3") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap3_wp_cap string "")
  (ap3_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB3") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap3_wp_con string "")
  (ap3_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB3") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap4_sat_cap string "")
  (ap4_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB4") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap4_sat_con string "")
  (ap4_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB4") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap4_fc_cap string "")
  (ap4_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB4") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap4_fc_con string "")
  (ap4_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB4") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap4_wp_cap string "")
  (ap4_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB4") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap4_wp_con string "")
  (ap4_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB4") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap5_sat_cap string "")
  (ap5_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB5") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap5_sat_con string "")
  (ap5_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB5") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap5_fc_cap string "")
  (ap5_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB5") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap5_fc_con string "")
  (ap5_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB5") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap5_wp_cap string "")
  (ap5_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB5") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap5_wp_con string "")
  (ap5_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB5") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap6_sat_cap string "")
  (ap6_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB6") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap6_sat_con string "")
  (ap6_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB6") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap6_fc_cap string "")
  (ap6_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB6") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap6_fc_con string "")
  (ap6_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB6") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap6_wp_cap string "")
  (ap6_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB6") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap6_wp_con string "")
  (ap6_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB6") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare ap7_sat_cap string "")
  (ap7_sat_cap (value (number (soil_heat_capacity (horizon "Ap_JB7") 
                                                  (top_soil true)
                                                  (h (const 0 [cm]))))))
  (declare ap7_sat_con string "")
  (ap7_sat_con (value (number (soil_heat_conductivity (horizon "Ap_JB7") 
                                                      (top_soil true)
                                                      (h (const 0 [cm]))))))
  (declare ap7_fc_cap string "")
  (ap7_fc_cap (value (number (soil_heat_capacity (horizon "Ap_JB7") 
                                                 (top_soil true)
                                                 (h (const 2 [pF]))))))
  (declare ap7_fc_con string "")
  (ap7_fc_con (value (number (soil_heat_conductivity (horizon "Ap_JB7") 
                                                     (top_soil true)
                                                     (h (const 2 [pF]))))))
  (declare ap7_wp_cap string "")
  (ap7_wp_cap (value (number (soil_heat_capacity (horizon "Ap_JB7") 
                                                 (top_soil true)
                                                 (h (const 4.2 [pF]))))))
  (declare ap7_wp_con string "")
  (ap7_wp_con (value (number (soil_heat_conductivity (horizon "Ap_JB7") 
                                                     (top_soil true)
                                                     (h (const 4.2 [pF]))))))
  (declare con_dim string "")
  (con_dim (dimension (number (soil_heat_conductivity (horizon "Ap_JB7") 
                                                      (top_soil true)
                                                      (h (const 4.2 [pF]))))))
  (declare cap_dim string "")
  (cap_dim (dimension (number (soil_heat_capacity (horizon "Ap_JB7") 
                                                  (top_soil true)
                                                  (h (const 4.2 [pF]))))))

  (what "\tJB1\tJB2\tJB3\tJB4\tJB5\tJB6\tJB7
WP [${con_dim}]\t${ap1_wp_con}\t${ap2_wp_con}\t${ap3_wp_con}\t${ap4_wp_con}\t${ap5_wp_con}\t${ap6_wp_con}\t${ap7_wp_con}
FC [${con_dim}]\t${ap1_fc_con}\t${ap2_fc_con}\t${ap3_fc_con}\t${ap4_fc_con}\t${ap5_fc_con}\t${ap6_fc_con}\t${ap7_fc_con}
SAT [${con_dim}]\t${ap1_sat_con}\t${ap2_sat_con}\t${ap3_sat_con}\t${ap4_sat_con}\t${ap5_sat_con}\t${ap6_sat_con}\t${ap7_sat_con}
WP [${cap_dim}]\t${ap1_wp_cap}\t${ap2_wp_cap}\t${ap3_wp_cap}\t${ap4_wp_cap}\t${ap5_wp_cap}\t${ap6_wp_cap}\t${ap7_wp_cap}
FC [${cap_dim}]\t${ap1_fc_cap}\t${ap2_fc_cap}\t${ap3_fc_cap}\t${ap4_fc_cap}\t${ap5_fc_cap}\t${ap6_fc_cap}\t${ap7_fc_cap}
SAT [${cap_dim}]\t${ap1_sat_cap}\t${ap2_sat_cap}\t${ap3_sat_cap}\t${ap4_sat_cap}\t${ap5_sat_cap}\t${ap6_sat_cap}\t${ap7_sat_cap}
"))

(run main)

;;; sample-heat.dai ends here.
