c******************************************************************** subroutine input_data_parser c******************************************************************** integer ns parameter(ns=5) c canopy parameters character*1000 comment common /test_comment/ comment c program run switches integer canopy_coho_flag,specie_coho_flag(ns) integer plant_coho_flag(ns) common /coho_flags_v/ canopy_coho_flag,specie_coho_flag, & plant_coho_flag integer canopy_coho,specie_coho,plant_coho common /coho_flags/ canopy_coho,specie_coho,plant_coho c radar parameters real frequency_ghz,incident_angle_degrees,azimuth_angle_degrees common/radar/frequency_ghz,incident_angle_degrees & ,azimuth_angle_degrees real pi,c,radians_per_degree real freq,lambda real incidence_radians real theta_i,phi_i,k_0 common /incident/ theta_i,phi_i,k_0 real spot_size_sqr_meters common /pattern_data_in/ spot_size_sqr_meters real spot_size common /pattern_data/ spot_size c specie parameters c row structure parameters c plant structure parameters real canopy_layer_height_cm,leaf_layer_size_cm(ns) real leaf_center_cm(ns),leaf_hole_cm(ns) common /layer_structure/ canopy_layer_height_cm, & leaf_layer_size_cm,leaf_center_cm,leaf_hole_cm real d,del_leaf,z_lc,hole common /layer_struct/ d,del_leaf,z_lc,hole c dielectric parameters complex epsln_leaf(ns),epsln_soil_in complex epsln_stalk(ns),epsln_grain(ns) common /dielectrics_v/ epsln_leaf,epsln_soil_in, & epsln_stalk,epsln_grain complex e_leaf,e_soil,e_stalk,e_grain common /dielectrics/ e_leaf,e_soil,e_stalk,e_grain real leaf_volumetric_moisture_Mv(ns) real stalk_volumetric_moisture_Mv(ns) real grain_volumetric_moisture_Mv(ns) real soil_volumetric_moisture_Mv common /volumetric_moisture/ leaf_volumetric_moisture_Mv, & stalk_volumetric_moisture_Mv,grain_volumetric_moisture_Mv, & soil_volumetric_moisture_Mv real soil_prcnt_clay,soil_prcnt_sand common /soil_composition/ soil_prcnt_clay,soil_prcnt_sand real vegetation_temperature_deg_C common /temperatures/vegetation_temperature_deg_C integer N_species common /canopy_data/ N_species N_species=1 call default_parameters(N_species) pi=4.0*atan(1.0) c=3.0e10 radians_per_degree=Pi/180.0 c program run switches canopy_coho=canopy_coho_flag c print*,'canopy_coho',canopy_coho c radar parameters freq=frequency_ghz*1.0e09 lambda=c/freq k_0=2.0*pi/lambda c print*,'frequency_ghz,lambda,k_0',frequency_ghz,lambda,k_0 incidence_radians=incident_angle_degrees*radians_per_degree theta_i=pi-incidence_radians c print*,'incident_angle_degrees,incidence_radians,theta_i', c & incident_angle_degrees,incidence_radians,theta_i phi_i=azimuth_angle_degrees*radians_per_degree c print*,'azimuth_angle_degrees,phi_i', c & azimuth_angle_degrees,phi_i spot_size=spot_size_sqr_meters*100.0*100.0 c print*,'spot_size_sqr_meters,spot_size', c & spot_size_sqr_meters,spot_size c plant structure parameters d=canopy_layer_height_cm c print*,'d,canopy_layer_height_cm',d,canopy_layer_height_cm c dielectric parameters if(epsln_soil_in .eq. cmplx(1.0,0.0))then call soil_dielectric(frequency_ghz, & soil_volumetric_moisture_Mv, & soil_prcnt_sand,soil_prcnt_clay, e_soil) else e_soil=epsln_soil_in endif c print*,'e_soil',e_soil return end c******************************************************************** subroutine load_specie_data(specie) c******************************************************************** integer ns parameter(ns=5) integer specie c canopy parameters integer N_species common /canopy_data/ N_species c program run switches integer canopy_coho_flag,specie_coho_flag(ns) integer plant_coho_flag(ns) common /coho_flags_v/ canopy_coho_flag,specie_coho_flag, & plant_coho_flag integer canopy_coho,specie_coho,plant_coho common /coho_flags/ canopy_coho,specie_coho,plant_coho integer leaf_flag_v(ns),stalk_flag_v(ns),grain_flag_v(ns) integer grain_leaf_flag(ns),grain_stalk_flag(ns) integer stalk_leaf_flag(ns),leaf_leaf_flag(ns) common /scat_term_flags_v/ leaf_flag_v,stalk_flag_v & ,grain_flag_v,grain_leaf_flag,grain_stalk_flag, & stalk_leaf_flag,leaf_leaf_flag integer leaf_flag,stalk_flag,grain_flag integer gl_flag,gs_flag,sl_flag,ll_flag common /scat_term_flags/ leaf_flag,stalk_flag,grain_flag, & gl_flag,gs_flag,sl_flag,ll_flag c radar parameters real frequency_ghz,incident_angle_degrees,azimuth_angle_degrees common/radar/frequency_ghz,incident_angle_degrees & ,azimuth_angle_degrees c specie parameters character *15 specie_structure(ns) common /specie_structure_v/ specie_structure character *15 specie_struct common /specie_structure/ specie_struct real N_plants_per_sqr_meter(ns) common /unfrm_data_in/ N_plants_per_sqr_meter real N_ppscm common /unfrm_data/ N_ppscm c row structure parameters real N_plants_per_row_meter(ns),row_spacing_cm(ns) real row_sigma_cm(ns) common /row_data_in/N_plants_per_row_meter,row_spacing_cm & ,row_sigma_cm real N_pprcm,row_spacing,row_sig common /row_data/ N_pprcm,row_spacing,row_sig character *15 row_plant_pdf_x_v(ns),row_plant_pdf_y_v(ns) character *15 row_plant_depend_v(ns) common /row_plant_dist_v/ row_plant_pdf_x_v,row_plant_pdf_y_v, & row_plant_depend_v character *15 row_plant_pdf_x,row_plant_pdf_y,row_plant_depend common /row_plant_dist/ row_plant_pdf_x,row_plant_pdf_y, & row_plant_depend character *15 row_space_stat_v(ns) common /row_space_model_v/ row_space_stat_v character *15 row_space_stat common /row_space_model/ row_space_stat real azimuth_sweep_min_degrees(ns),azimuth_sweep_max_degrees(ns) real azimuth_incrmnt_degrees(ns) integer azimuth_sweep_flag_v(ns) common /azimuth_sweep_data_v/azimuth_sweep_min_degrees, & azimuth_sweep_max_degrees,azimuth_incrmnt_degrees, & azimuth_sweep_flag_v real phi_min,phi_max,phi_delta integer phi_sweep_flg common /phi_sweep_data/phi_min,phi_max,phi_delta,phi_sweep_flg c plant structure parameters real canopy_layer_height_cm,leaf_layer_size_cm(ns) real leaf_center_cm(ns),leaf_hole_cm(ns) common /layer_structure/ canopy_layer_height_cm, & leaf_layer_size_cm,leaf_center_cm,leaf_hole_cm real d,del_leaf,z_lc,hole common /layer_struct/ d,del_leaf,z_lc,hole integer N_leaf_per_plant(ns) common /leaf_number_v/ N_leaf_per_plant integer N_leaf common /leaf_number/ N_leaf c dielectric parameters complex epsln_leaf(ns),epsln_soil_in complex epsln_stalk(ns),epsln_grain(ns) common /dielectrics_v/ epsln_leaf,epsln_soil_in, & epsln_stalk,epsln_grain real leaf_volumetric_moisture_Mv(ns) real stalk_volumetric_moisture_Mv(ns) real grain_volumetric_moisture_Mv(ns) real soil_volumetric_moisture_Mv common /volumetric_moisture/ leaf_volumetric_moisture_Mv, & stalk_volumetric_moisture_Mv,grain_volumetric_moisture_Mv, & soil_volumetric_moisture_Mv real soil_prcnt_clay,soil_prcnt_sand common /soil_composition/ soil_prcnt_clay,soil_prcnt_sand real vegetation_temperature_deg_C common /temperatures/vegetation_temperature_deg_C complex e_leaf,e_soil,e_stalk,e_grain common /dielectrics/ e_leaf,e_soil,e_stalk,e_grain c leaf_structure parameters character*15 leaf_cross_section(ns) common /leaf_cross_section/leaf_cross_section character*15 leaf_cs,l_cs_store common /l_cross_section/ leaf_cs,l_cs_store real leaf_blade_thick_cm(ns),leaf_blade_width_cm(ns) real leaf_blade_curvature(ns) real leaf_angle_degrees(ns) common /leaf_blade_cross_section/leaf_blade_thick_cm, & leaf_blade_width_cm,leaf_blade_curvature, & leaf_angle_degrees real thick_l,width_l,curv_l,angle_l,w_l_save common /leaf_blade_cs/ thick_l,width_l,curv_l,angle_l,w_l_save character*15 leaf_blade_taper(ns) common /blade_leaf_taper_v/ leaf_blade_taper character*15 blade_taper_l common /blade_leaf_taper/ blade_taper_l real leaf_diameter_cm(ns) common /leaf_circle_cross_section/leaf_diameter_cm real diam_l,d_l_save common /leaf_circle_cs/ diam_l,d_l_save character*15 leaf_circle_taper(ns) common /circ_leaf_taper_v/ leaf_circle_taper character*15 circ_taper_l common /circ_leaf_taper/ circ_taper_l character*15 leaf_alpha_pdf(ns),leaf_v_pdf(ns) common /leaf_pdf_v/ leaf_alpha_pdf,leaf_v_pdf character*15 l_alf_pdf,lv_pdf common /leaf_pdf/ l_alf_pdf,lv_pdf real leaf_model_correlation(3,3,ns),leaf_model_mean(3,ns) common /leaf_model_stats/leaf_model_correlation,leaf_model_mean real lf_mn(3),lf_cor(3,3) c stalk structure parameters character*15 stalk_cross_section(ns) common /stalk_cross_section/ stalk_cross_section character*15 stalk_cs,s_cs_store common /s_cross_section/ stalk_cs,s_cs_store real stalk_blade_thick_cm(ns),stalk_blade_width_cm(ns) real stalk_blade_curvature(ns) real stalk_angle_degrees(ns) common /stalk_blade_cross_section/stalk_blade_thick_cm, & stalk_blade_width_cm,stalk_blade_curvature, & stalk_angle_degrees real thick_s,width_s,curv_s,angle_s,w_s_save common /stalk_blade_cs/ thick_s,width_s,curv_s,angle_s,w_s_save character*15 stalk_blade_taper(ns) common /blade_stalk_taper_v/ stalk_blade_taper character*15 blade_taper_s common /blade_stalk_taper/ blade_taper_s real stalk_diameter_cm(ns),stalk_diam_taper(ns) common /stalk_circle_cross_section/stalk_diameter_cm & ,stalk_diam_taper real diam_s,d_s_save,d_tpr common /stalk_circle_cs/ diam_s,d_s_save,d_tpr character*15 stalk_circle_taper(ns) common /circ_stalk_taper_v/ stalk_circle_taper character*15 circ_taper_s common /circ_stalk_taper/ circ_taper_s character*15 stalk_alpha_pdf(ns),stalk_a_pdf(ns) character*15 stalk_z0_pdf(ns) common /stalk_pdf_v/ stalk_alpha_pdf,stalk_a_pdf,stalk_z0_pdf character *15 s_alf_pdf,sa_pdf,sz0_pdf common /stalk_pdf/ s_alf_pdf,sa_pdf,sz0_pdf real a_mean(ns),a_sigma(ns) common /a_stat_v/ a_mean,a_sigma real a_mn,a_sig common /a_stat/ a_mn,a_sig real z0_mean_cm(ns),z0_sigma_cm(ns) common /z0_stat_v/ z0_mean_cm,z0_sigma_cm real z0_mn,z0_sig common /z0_stat/ z0_mn,z0_sig real amin,amax,z0min,z0max common/stalk_limits/ amin,amax,z0min,z0max c grain structure parameters real grain_diameter_cm(ns) common /grain_circle_cross_section/grain_diameter_cm real diam_g common /grain_circle_cs/ diam_g character*15 grain_alpha_pdf(ns),grain_a_pdf(ns) character*15 grain_h_pdf(ns) common /grain_pdf_v/ grain_alpha_pdf,grain_a_pdf,grain_h_pdf character *15 g_alf_pdf,ga_pdf,gh_pdf common /grain_pdf/ g_alf_pdf,ga_pdf,gh_pdf real grn_a_mean(ns),grn_a_sigma(ns) common /grn_a_stat_v/ grn_a_mean,grn_a_sigma real ga_mn,ga_sig common /grn_a_stat/ ga_mn,ga_sig real h_mean_cm(ns),h_sigma_cm(ns) common /h_stat_v/ h_mean_cm,h_sigma_cm real h_mn,h_sig common /h_stat/ h_mn,h_sig real gamin,gamax,hmin,hmax common /grain_limits/ gamin,gamax,hmin,hmax c common block for integrals real bound common/int_data/ bound real pi,radians_per_degree pi=4.0*atan(1.0) radians_per_degree=pi/180.0 specie_struct=specie_structure(specie) c print*,'specie_struct',specie_struct specie_coho=specie_coho_flag(specie) plant_coho=plant_coho_flag(specie) c print*,'specie_coho,plant_coho',specie_coho,plant_coho N_ppscm=N_plants_per_sqr_meter(specie)/(100.0*100.0) c print*,'N_ppscm',N_ppscm N_pprcm=N_plants_per_row_meter(specie)/100.0 row_spacing=row_spacing_cm(specie) row_sig=row_sigma_cm(specie) c print*,'N_pprcm,row_spacing,row_sig',N_pprcm,row_spacing,row_sig row_plant_pdf_x=row_plant_pdf_x_v(specie) row_plant_pdf_y=row_plant_pdf_y_v(specie) row_plant_depend=row_plant_depend_v(specie) c print*,'row_plant_pdf_x,row_plant_pdf_y,row_plant_depend', c & row_plant_pdf_x,row_plant_pdf_y,row_plant_depend row_space_stat=row_space_stat_v(specie) c print*,'row_space_stat',row_space_stat phi_min=azimuth_sweep_min_degrees(specie)*radians_per_degree phi_max=azimuth_sweep_max_degrees(specie)*radians_per_degree phi_delta=azimuth_incrmnt_degrees(specie)*radians_per_degree phi_sweep_flg=azimuth_sweep_flag_v(specie) N_leaf=N_leaf_per_plant(specie) c print*,'N_leaf',N_leaf leaf_flag=leaf_flag_v(specie) stalk_flag=stalk_flag_v(specie) grain_flag=grain_flag_v(specie) gl_flag=grain_leaf_flag(specie) gs_flag=grain_stalk_flag(specie) sl_flag=stalk_leaf_flag(specie) ll_flag=leaf_leaf_flag(specie) c print*,'leaf_flag,stalk_flag,grain_flag,gl_flag,gs_flag, c & sl_flag,ll_flag',leaf_flag,stalk_flag,grain_flag, c & gl_flag,gs_flag,sl_flag,ll_flag del_leaf=leaf_layer_size_cm(specie) z_lc=leaf_center_cm(specie)-d hole=leaf_hole_cm(specie) leaf_cs=leaf_cross_section(specie) l_cs_store=leaf_cs c print*,'leaf_cs,l_cs_store',leaf_cs,l_cs_store if(epsln_leaf(specie) .eq. cmplx(1.0,0.0))then call vegetation_dielectric(frequency_ghz, & leaf_volumetric_moisture_Mv(specie) & ,vegetation_temperature_deg_C, e_leaf) e_leaf=conjg(e_leaf) else e_leaf=epsln_leaf(specie) endif if(epsln_stalk(specie) .eq. cmplx(1.0,0.0))then call vegetation_dielectric(frequency_ghz, & stalk_volumetric_moisture_Mv(specie) & ,vegetation_temperature_deg_C, e_stalk) e_stalk=conjg(e_stalk) else e_stalk=epsln_stalk(specie) endif if(epsln_grain(specie) .eq. cmplx(1.0,0.0))then call vegetation_dielectric(frequency_ghz, & grain_volumetric_moisture_Mv(specie) & ,vegetation_temperature_deg_C, e_grain) e_grain=conjg(e_grain) else e_grain=epsln_grain(specie) endif c print*,'e_leaf,e_stalk,e_grain',e_leaf,e_stalk,e_grain thick_l=leaf_blade_thick_cm(specie) width_l=leaf_blade_width_cm(specie) curv_l=leaf_blade_curvature(specie) angle_l=leaf_angle_degrees(specie) w_l_save=width_l c print*,'thick_l,width_l,curv_l,angle_l,w_l_save', c & thick_l,width_l,curv_l,angle_l,w_l_save blade_taper_l=leaf_blade_taper(specie) c print*,'blade_taper_l',blade_taper_l diam_l=leaf_diameter_cm(specie) d_l_save=diam_l c print*,'diam_l,d_l_save',diam_l,d_l_save circ_taper_l=leaf_circle_taper(specie) c print*,'circ_taper_l',circ_taper_l stalk_cs=stalk_cross_section(specie) s_cs_store=stalk_cs c print*,'stalk_cs,s_cs_store',stalk_cs,s_cs_store thick_s=stalk_blade_thick_cm(specie) width_s=stalk_blade_width_cm(specie) curv_s=stalk_blade_curvature(specie) angle_s=stalk_angle_degrees(specie) w_s_save=width_s c print*,'thick_s,width_s,curv_s,angle_s,w_s_save', c & thick_s,width_s,curv_s,angle_s,w_s_save blade_taper_s=stalk_circle_taper(specie) c print*,'blade_taper_s',blade_taper_s diam_s=stalk_diameter_cm(specie) d_s_save=diam_s d_tpr=stalk_diam_taper(specie) c print*,'diam_s,d_s_save,d_tpr',diam_s,d_s_save,d_tpr circ_taper_s=stalk_circle_taper(specie) c print*,'circ_taper_s',circ_taper_s l_alf_pdf=leaf_alpha_pdf(specie) lv_pdf=leaf_v_pdf(specie) c print*,'l_alf_pdf,lv_pdf',l_alf_pdf,lv_pdf lf_mn(1)=leaf_model_mean(1,specie) lf_mn(2)=leaf_model_mean(2,specie) lf_mn(3)=leaf_model_mean(3,specie) c print*,'lf_mn(1),lf_mn(2),lf_mn(3) ', c & lf_mn(1),lf_mn(2),lf_mn(3) lf_cor(1,1)=leaf_model_correlation(1,1,specie) lf_cor(1,2)=leaf_model_correlation(1,2,specie) lf_cor(1,3)=leaf_model_correlation(1,3,specie) c print*,'lf_cor(1,1),lf_cor(1,2),lf_cor(1,3) ', c & lf_cor(1,1),lf_cor(1,2),lf_cor(1,3) lf_cor(2,1)=leaf_model_correlation(2,1,specie) lf_cor(2,2)=leaf_model_correlation(2,2,specie) lf_cor(2,3)=leaf_model_correlation(2,3,specie) c print*,'lf_cor(2,1),lf_cor(2,2),lf_cor(2,3) ', c & lf_cor(2,1),lf_cor(2,2),lf_cor(2,3) lf_cor(3,1)=leaf_model_correlation(3,1,specie) lf_cor(3,2)=leaf_model_correlation(3,2,specie) lf_cor(3,3)=leaf_model_correlation(3,3,specie) c print*,'lf_cor(3,1),lf_cor(3,2),lf_cor(3,3) ', c & lf_cor(3,1),lf_cor(3,2),lf_cor(3,3) call eigen_solve(lf_mn,lf_cor) s_alf_pdf=stalk_alpha_pdf(specie) sa_pdf=stalk_a_pdf(specie) sz0_pdf=stalk_z0_pdf(specie) c print*,'s_alf_pdf,sa_pdf,sz0_pdf', c & s_alf_pdf,sa_pdf,sz0_pdf a_mn=a_mean(specie) a_sig=a_sigma(specie) amin=0.0 amax=3.0*a_mn c print*,'a_mn,a_sig',a_mn,a_sig z0_mn=z0_mean_cm(specie)-d z0_sig=z0_sigma_cm(specie) z0min=z0_mn-3.0*z0_sig z0max=z0_mn+3.0*z0_sig c print*,'z0_mn,z0_sig',z0_mn,z0_sig c grain structure parameters diam_g=grain_diameter_cm(specie) c print*,'diam_g',diam_g g_alf_pdf=grain_alpha_pdf(specie) ga_pdf=grain_a_pdf(specie) gh_pdf=grain_h_pdf(specie) c print*,'g_alf_pdf,ga_pdf,gh_pdf',g_alf_pdf,ga_pdf,gh_pdf ga_mn=grn_a_mean(specie) ga_sig=grn_a_sigma(specie) gamin=0.0 gamax=3.0*ga_mn c print*,'ga_mn,ga_sig',ga_mn,ga_sig h_mn=h_mean_cm(specie) h_sig=h_sigma_cm(specie) hmin=h_mn-(3.0*h_sig) hmax=h_mn+(3.0*h_sig) c print*,'h_mn,h_sig',h_mn,h_sig return end