diff --git a/src/components/shell_variable_manifest.md b/src/components/shell_variable_manifest.md index b6afe3a5..535355e8 100644 --- a/src/components/shell_variable_manifest.md +++ b/src/components/shell_variable_manifest.md @@ -26,10 +26,10 @@ Note: This does not include variables defined in python scripts. | channels | ['envs/Harvard-Cannon/imi_env.yml'] | ['envs/Harvard-Cannon/imi_env.yml'] | [] | [] | | ClusteringMethod | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | [] | | cmd | ['src/components/template_component/template.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh'] | ['src/components/template_component/template.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh'] | ['setup_template', 'run_hemco_prior_emis'] | ['setup_template', 'run_hemco_prior_emis', 'run_hemco_sa', 'exclude_soil_sink'] | -| condaEnv | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | [] | [] | | CondaEnv | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | [] | -| CondaFile | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | [] | +| condaEnv | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | [] | [] | | condaFile | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | [] | [] | +| CondaFile | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | [] | | config_path | ['src/components/preview_component/preview.sh'] | ['src/components/preview_component/preview.sh'] | ['run_preview'] | ['run_preview'] | | ConfigFile | ['run_imi.sh', 'src/components/inversion_component/inversion.sh', 'src/components/preview_component/preview.sh', 'src/utilities/cleanup_script.sh'] | ['run_imi.sh', 'src/utilities/cleanup_script.sh'] | [] | ['setup_inversion', 'run_preview'] | | configFile | ['src/inversion_scripts/run_inversion.sh'] | ['src/inversion_scripts/run_inversion.sh'] | [] | ['send_error'] | @@ -73,8 +73,8 @@ Note: This does not include variables defined in python scripts. | ErrorBCs | ['src/inversion_scripts/run_inversion.sh'] | ['src/inversion_scripts/run_inversion.sh'] | [] | ['send_error'] | | ErrorOH | ['src/inversion_scripts/run_inversion.sh'] | ['src/inversion_scripts/run_inversion.sh'] | [] | ['send_error'] | | FetchTROPOMI | ['src/components/posterior_component/posterior.sh'] | ['src/components/posterior_component/posterior.sh'] | ['run_posterior'] | ['setup_posterior', 'run_posterior', 'generate_optimized_BC_values', 'generate_optimized_OH_value'] | -| file | ['src/components/hemco_prior_emis_component/hemco_prior_emis.sh', 'src/utilities/find_corrupt_files.sh', 'src/utilities/common.sh', 'src/utilities/crop_met.sh', 'src/inversion_scripts/run_inversion.sh'] | ['src/utilities/common.sh', 'src/inversion_scripts/run_inversion.sh'] | ['imi_failed', 'send_error'] | ['run_hemco_sa', 'print_stats', 'imi_failed', 'ncmax', 'ncmin', 'calculate_geoschem_domain', 'send_error'] | | FILE | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | [] | [] | +| file | ['src/components/hemco_prior_emis_component/hemco_prior_emis.sh', 'src/utilities/find_corrupt_files.sh', 'src/utilities/common.sh', 'src/utilities/crop_met.sh', 'src/inversion_scripts/run_inversion.sh'] | ['src/utilities/common.sh', 'src/inversion_scripts/run_inversion.sh'] | ['imi_failed', 'send_error'] | ['run_hemco_sa', 'print_stats', 'imi_failed', 'ncmax', 'ncmin', 'calculate_geoschem_domain', 'send_error'] | | FILE_LIST | ['src/utilities/find_corrupt_files.sh'] | ['src/utilities/find_corrupt_files.sh'] | [] | ['download_aws_files', 'report'] | | filename | ['src/components/kalman_component/kalman.sh'] | ['src/components/kalman_component/kalman.sh'] | ['run_period'] | ['setup_kf', 'run_kf', 'run_period', 'get_last_rundir_suffix'] | | FirstPeriod | ['src/components/kalman_component/kalman.sh'] | ['src/components/kalman_component/kalman.sh'] | ['run_kf'] | ['setup_kf', 'run_kf', 'run_period', 'get_last_rundir_suffix'] | @@ -174,12 +174,12 @@ Note: This does not include variables defined in python scripts. | Lons | ['src/components/template_component/template.sh'] | ['src/components/template_component/template.sh'] | ['setup_template'] | ['setup_template'] | | MakePeriodsCSV | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml', 'src/components/kalman_component/kalman.sh', 'src/components/setup_component/setup.sh'] | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | ['setup_kf', 'setup_imi'] | | MaxSimultaneousRuns | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml', 'src/components/jacobian_component/jacobian.sh'] | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | ['setup_jacobian'] | -| MET | ['src/utilities/find_corrupt_files.sh'] | ['src/utilities/find_corrupt_files.sh'] | [] | ['download_aws_files', 'report'] | | Met | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml', 'src/components/statevector_component/statevector.sh', 'src/components/setup_component/setup.sh', 'src/components/template_component/template.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh'] | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | ['create_statevector', 'setup_imi', 'setup_template', 'run_hemco_prior_emis'] | +| MET | ['src/utilities/find_corrupt_files.sh'] | ['src/utilities/find_corrupt_files.sh'] | [] | ['download_aws_files', 'report'] | | metDir | ['src/components/statevector_component/statevector.sh', 'src/components/setup_component/setup.sh'] | ['src/components/setup_component/setup.sh'] | ['setup_imi'] | ['create_statevector', 'setup_imi', 'activate_observations'] | | metNum | ['src/components/template_component/template.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh'] | ['src/components/template_component/template.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh'] | ['setup_template', 'run_hemco_prior_emis'] | ['setup_template', 'run_hemco_prior_emis', 'run_hemco_sa', 'exclude_soil_sink'] | -| mm | ['src/utilities/crop_met.sh'] | ['src/utilities/crop_met.sh'] | [] | [] | | MM | ['src/components/template_component/template.sh'] | [] | [] | ['setup_template'] | +| mm | ['src/utilities/crop_met.sh'] | ['src/utilities/crop_met.sh'] | [] | [] | | Month | ['src/utilities/crop_met.sh'] | [] | [] | [] | | n_elems | ['src/components/jacobian_component/jacobian.sh'] | ['src/components/jacobian_component/jacobian.sh'] | ['calculate_tracer_end'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | | name | ['envs/Harvard-Cannon/imi_env.yml', 'src/components/jacobian_component/jacobian.sh'] | ['envs/Harvard-Cannon/imi_env.yml', 'src/components/jacobian_component/jacobian.sh'] | ['create_simulation_dir'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | @@ -275,8 +275,8 @@ Note: This does not include variables defined in python scripts. | rm_command | ['src/utilities/cleanup_script.sh'] | ['src/utilities/cleanup_script.sh'] | [] | [] | | ROOT | ['src/components/jacobian_component/jacobian.sh', 'src/components/template_component/template.sh'] | [] | [] | ['create_simulation_dir', 'setup_template'] | | run_dirs_pth | ['src/components/kalman_component/kalman.sh'] | ['src/components/kalman_component/kalman.sh'] | ['get_last_rundir_suffix'] | ['setup_kf', 'run_kf', 'run_period', 'get_last_rundir_suffix'] | -| RUNDIR | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | [] | [] | | RunDir | ['src/utilities/cleanup_script.sh'] | ['src/utilities/cleanup_script.sh'] | [] | [] | +| RUNDIR | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh'] | [] | [] | | runDir | ['src/components/posterior_component/posterior.sh', 'src/components/jacobian_component/jacobian.sh', 'src/components/setup_component/setup.sh', 'src/components/template_component/template.sh', 'src/components/spinup_component/spinup.sh', 'src/components/preview_component/preview.sh', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/components/posterior_component/posterior.sh', 'src/components/jacobian_component/jacobian.sh', 'src/components/setup_component/setup.sh', 'src/components/spinup_component/spinup.sh', 'src/components/preview_component/preview.sh', 'src/write_BCs/run_boundary_conditions.sh'] | ['setup_posterior', 'create_simulation_dir', 'setup_imi', 'setup_spinup', 'run_preview'] | ['setup_posterior', 'run_posterior', 'generate_optimized_BC_values', 'generate_optimized_OH_value', 'setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number', 'setup_imi', 'activate_observations', 'setup_template', 'setup_spinup', 'run_spinup', 'run_preview'] | | rundir_num | ['src/components/kalman_component/kalman.sh'] | ['src/components/kalman_component/kalman.sh'] | ['run_period'] | ['setup_kf', 'run_kf', 'run_period', 'get_last_rundir_suffix'] | | RunDirs | ['run_imi.sh', 'src/components/statevector_component/statevector.sh', 'src/components/kalman_component/kalman.sh', 'src/components/posterior_component/posterior.sh', 'src/components/inversion_component/inversion.sh', 'src/components/jacobian_component/jacobian.sh', 'src/components/setup_component/setup.sh', 'src/components/template_component/template.sh', 'src/components/spinup_component/spinup.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh', 'src/components/preview_component/preview.sh'] | ['run_imi.sh', 'src/components/setup_component/setup.sh'] | ['setup_imi'] | ['create_statevector', 'reduce_dimension', 'setup_kf', 'run_kf', 'run_period', 'setup_posterior', 'run_posterior', 'setup_inversion', 'run_inversion', 'run_notebooks', 'setup_jacobian', 'create_simulation_dir', 'run_jacobian', 'setup_imi', 'activate_observations', 'setup_template', 'setup_spinup', 'run_spinup', 'run_hemco_prior_emis', 'run_hemco_sa', 'run_preview'] | @@ -325,8 +325,8 @@ Note: This does not include variables defined in python scripts. | start_elem | ['src/components/jacobian_component/jacobian.sh'] | ['src/components/jacobian_component/jacobian.sh'] | ['calculate_tracer_end'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | | start_element | ['src/components/jacobian_component/jacobian.sh'] | ['src/components/jacobian_component/jacobian.sh'] | ['create_simulation_dir'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | | start_time | ['run_imi.sh'] | ['run_imi.sh'] | [] | [] | -| startDate | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/write_BCs/config_boundary_conditions.yml'] | [] | [] | | StartDate | ['config.yml', 'run_imi.sh', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml', 'src/components/kalman_component/kalman.sh', 'src/components/posterior_component/posterior.sh', 'src/components/jacobian_component/jacobian.sh', 'src/components/setup_component/setup.sh', 'src/components/template_component/template.sh', 'src/components/spinup_component/spinup.sh', 'src/components/hemco_prior_emis_component/hemco_prior_emis.sh', 'src/inversion_scripts/run_inversion.sh'] | ['config.yml', 'envs/Harvard-Cannon/config.harvard-cannon.yml', 'envs/Harvard-Cannon/config.harvard-cannon.global_inv.yml'] | [] | ['setup_kf', 'run_period', 'setup_posterior', 'run_posterior', 'setup_jacobian', 'create_simulation_dir', 'run_jacobian', 'setup_imi', 'setup_template', 'setup_spinup', 'run_hemco_prior_emis'] | +| startDate | ['src/write_BCs/config_boundary_conditions.yml', 'src/write_BCs/run_boundary_conditions.sh'] | ['src/write_BCs/config_boundary_conditions.yml'] | [] | [] | | StartDate_i | ['src/components/kalman_component/kalman.sh', 'src/components/posterior_component/posterior.sh', 'src/components/inversion_component/inversion.sh'] | ['src/components/kalman_component/kalman.sh', 'src/components/posterior_component/posterior.sh'] | ['run_period', 'run_posterior'] | ['setup_kf', 'run_kf', 'run_period', 'get_last_rundir_suffix', 'setup_posterior', 'run_posterior', 'generate_optimized_BC_values', 'generate_optimized_OH_value', 'run_inversion'] | | StartMonth | ['src/utilities/crop_met.sh'] | ['src/utilities/crop_met.sh'] | [] | [] | | state_vector_path | ['src/components/statevector_component/statevector.sh', 'src/components/preview_component/preview.sh'] | ['src/components/statevector_component/statevector.sh', 'src/components/preview_component/preview.sh'] | ['reduce_dimension', 'run_preview'] | ['create_statevector', 'reduce_dimension', 'run_preview'] | @@ -348,7 +348,7 @@ Note: This does not include variables defined in python scripts. | xhat | ['src/components/posterior_component/posterior.sh'] | ['src/components/posterior_component/posterior.sh'] | ['generate_optimized_BC_values', 'generate_optimized_OH_value'] | ['setup_posterior', 'run_posterior', 'generate_optimized_BC_values', 'generate_optimized_OH_value'] | | xstr | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh', 'src/components/jacobian_component/jacobian.sh'] | ['src/geoschem_run_scripts/run_bkgd_simulation.sh', 'src/geoschem_run_scripts/run_prior_simulation.sh', 'src/geoschem_run_scripts/run_jacobian_simulations.sh', 'src/components/jacobian_component/jacobian.sh'] | ['setup_jacobian'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | | xUSE | ['src/components/jacobian_component/jacobian.sh'] | ['src/components/jacobian_component/jacobian.sh'] | ['setup_jacobian'] | ['setup_jacobian', 'create_simulation_dir', 'add_new_tracer', 'run_jacobian', 'generate_BC_perturb_values', 'calculate_tracer_end', 'calculate_num_jacobian_runs', 'is_number'] | -| Year | ['src/utilities/crop_met.sh'] | ['src/utilities/crop_met.sh'] | [] | [] | | YEAR | ['src/utilities/find_corrupt_files.sh'] | ['src/utilities/find_corrupt_files.sh'] | [] | ['download_aws_files', 'report'] | +| Year | ['src/utilities/crop_met.sh'] | ['src/utilities/crop_met.sh'] | [] | [] | | YYYY | ['src/components/template_component/template.sh'] | [] | [] | ['setup_template'] | | yyyymmdd | ['src/geoschem_run_scripts/run_jacobian_simulations.sh'] | ['src/geoschem_run_scripts/run_jacobian_simulations.sh'] | [] | [] | \ No newline at end of file diff --git a/src/inversion_scripts/get_jacobian_scalefactors.py b/src/inversion_scripts/get_jacobian_scalefactors.py index 562032ab..c639255b 100644 --- a/src/inversion_scripts/get_jacobian_scalefactors.py +++ b/src/inversion_scripts/get_jacobian_scalefactors.py @@ -49,7 +49,7 @@ def get_jacobian_scalefactors(period_number, inv_directory, ref_directory): # Note 2: This also assumes that the temporal variabily of the swapped emissions is the same. # If the temporal variability is different, there will be error associated with scaling # the Jacobian. - sf_K = pert_sf / ref_pert_sf + sf_K = ref_pert_sf / pert_sf # Apply the target_emis_ratio to the scale factors sf_K = sf_K * target_emis_ratio