From cb89b6e39d1b1e196ad9930f7087860a791115d5 Mon Sep 17 00:00:00 2001 From: sit23 Date: Fri, 13 Sep 2024 12:46:06 +0100 Subject: [PATCH] Updating socrates column model class so that it inherits the properties of the socrates code base, rather than having to redefine everything. Done the same with Column code base. Have also changed column model path names so that it inherits socrates paths in the same way as socrates code base. --- .../column_test_socrates_ozone.py | 4 +- src/extra/model/socrates_column/path_names | 384 ------------------ src/extra/python/isca/codebase.py | 60 +-- 3 files changed, 11 insertions(+), 437 deletions(-) diff --git a/exp/test_cases/column_test_case/column_test_socrates_ozone.py b/exp/test_cases/column_test_case/column_test_socrates_ozone.py index fb6a9193b..3ae00012f 100644 --- a/exp/test_cases/column_test_case/column_test_socrates_ozone.py +++ b/exp/test_cases/column_test_case/column_test_socrates_ozone.py @@ -154,8 +154,8 @@ 'socrates_rad_nml': { 'stellar_constant':1370., - 'lw_spectral_filename':os.path.join(GFDL_BASE,'src/atmos_param/socrates/src/trunk/data/spectra/ga7/sp_lw_ga7'), - 'sw_spectral_filename':os.path.join(GFDL_BASE,'src/atmos_param/socrates/src/trunk/data/spectra/ga7/sp_sw_ga7'), + 'lw_spectral_filename':os.path.join(GFDL_BASE,'src/atmos_param/socrates/src/1703/data/spectra/ga7/sp_lw_ga7'), + 'sw_spectral_filename':os.path.join(GFDL_BASE,'src/atmos_param/socrates/src/1703/data/spectra/ga7/sp_sw_ga7'), 'dt_rad':7200, 'store_intermediate_rad':True, 'chunk_size': 1, # MUST BE 1 FOR COLUMN MODEL diff --git a/src/extra/model/socrates_column/path_names b/src/extra/model/socrates_column/path_names index 92c7dbe95..8cebb40b6 100644 --- a/src/extra/model/socrates_column/path_names +++ b/src/extra/model/socrates_column/path_names @@ -185,390 +185,6 @@ shared/topography/gaussian_topog.F90 shared/topography/topography.F90 shared/tracer_manager/tracer_manager.F90 shared/tridiagonal/tridiagonal.F90 -atmos_param/socrates/src/trunk/src/aux/cdf_struc.finc -atmos_param/socrates/src/trunk/src/aux/cdl_struc.finc -atmos_param/socrates/src/trunk/src/aux/dec_disort.finc -atmos_param/socrates/src/trunk/src/aux/call_disort.finc -atmos_param/socrates/src/trunk/src/general/batch_error_main.finc -atmos_param/socrates/src/trunk/src/general/aerosol_component.finc -atmos_param/socrates/src/trunk/src/radiance_core/gauss_angle.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_mix_direct.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_dirn_weights.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_brdf.F90 -atmos_param/socrates/src/trunk/src/radiance_core/triple_solar_source.F90 -atmos_param/socrates/src/trunk/src/radiance_core/eval_uplm.F90 -atmos_param/socrates/src/trunk/src/radiance_core/shell_sort.F90 -atmos_param/socrates/src/trunk/src/radiance_core/rad_pcf.F90 -atmos_param/socrates/src/trunk/src/radiance_core/check_phf_term.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_n_source_coeff.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_surf_rad.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_random_overlap.F90 -atmos_param/socrates/src/trunk/src/radiance_core/scale_absorb.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calculate_density.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_flux_ipa.F90 -atmos_param/socrates/src/trunk/src/radiance_core/opt_prop_ice_cloud.F90 -atmos_param/socrates/src/trunk/src/radiance_core/diff_planck_source_tbl.F90 -atmos_param/socrates/src/trunk/src/radiance_core/eig_sys.F90 -atmos_param/socrates/src/trunk/src/radiance_core/adjust_ir_radiance.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_rad_layer.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_dimen.F90 -atmos_param/socrates/src/trunk/src/radiance_core/mcica_column.F90 -atmos_param/socrates/src/trunk/src/radiance_core/interp1d.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_uplm_zero.F90 -atmos_param/socrates/src/trunk/src/radiance_core/spline_fit.F90 -atmos_param/socrates/src/trunk/src/radiance_core/gaussian_weight_pcf.F90 -atmos_param/socrates/src/trunk/src/radiance_core/gas_list_pcf.F90 -atmos_param/socrates/src/trunk/src/radiance_core/trans_source_coeff.F90 -atmos_param/socrates/src/trunk/src/radiance_core/band_solver.F90 -atmos_param/socrates/src/trunk/src/radiance_core/mcica_sample.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_mix_direct_hogan.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_uplm_sol.F90 -atmos_param/socrates/src/trunk/src/radiance_core/sph_matrix_solver.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_spectrum.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_triple_app_scat.F90 -atmos_param/socrates/src/trunk/src/radiance_core/grey_opt_prop.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_gauss_weight_90.F90 -atmos_param/socrates/src/trunk/src/radiance_core/sum_k.F90 -atmos_param/socrates/src/trunk/src/radiance_core/ses_rescale_contm.F90 -atmos_param/socrates/src/trunk/src/radiance_core/spline_evaluate.F90 -atmos_param/socrates/src/trunk/src/radiance_core/cg_kappa_ms.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_bound.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_random_overlap_resort_rebin.F90 -atmos_param/socrates/src/trunk/src/radiance_core/monochromatic_gas_flux.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_cloud_pointer.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_cloud_geometry.F90 -atmos_param/socrates/src/trunk/src/radiance_core/rescale_phase_fnc.F90 -atmos_param/socrates/src/trunk/src/radiance_core/monochromatic_radiance_sph.F90 -atmos_param/socrates/src/trunk/src/radiance_core/inter_k.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_one_gas.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_top_rad.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_n_cloud_parameter.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_level_weights.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_k_eqv_scl.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_matrix_pentadiagonal.F90 -atmos_param/socrates/src/trunk/src/radiance_core/mix_app_scat.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_out.F90 -atmos_param/socrates/src/trunk/src/radiance_core/sol_scat_cos.F90 -atmos_param/socrates/src/trunk/src/radiance_core/copy_clr_full.F90 -atmos_param/socrates/src/trunk/src/radiance_core/eigenvalue_tri.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_homogen_direct.F90 -atmos_param/socrates/src/trunk/src/radiance_core/rescale_continuum.F90 -atmos_param/socrates/src/trunk/src/radiance_core/mixed_solar_source.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_aer.F90 -atmos_param/socrates/src/trunk/src/radiance_core/opt_prop_inhom_corr_cairns.F90 -atmos_param/socrates/src/trunk/src/radiance_core/rebin_esft_terms.F90 -atmos_param/socrates/src/trunk/src/radiance_core/mix_column.F90 -atmos_param/socrates/src/trunk/src/radiance_core/prsc_gather_spline.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_cg_coeff.F90 -atmos_param/socrates/src/trunk/src/radiance_core/inter_pt_lookup.F90 -atmos_param/socrates/src/trunk/src/radiance_core/opt_prop_ukca_aerosol.F90 -atmos_param/socrates/src/trunk/src/radiance_core/scale_wenyi.F90 -atmos_param/socrates/src/trunk/src/radiance_core/triple_column.F90 -atmos_param/socrates/src/trunk/src/radiance_core/single_scattering_all.F90 -atmos_param/socrates/src/trunk/src/radiance_core/inter_pt.F90 -atmos_param/socrates/src/trunk/src/radiance_core/overlap_coupled.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_cld.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solar_coefficient_basic.F90 -atmos_param/socrates/src/trunk/src/radiance_core/build_sph_matrix.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_k_eqv.F90 -atmos_param/socrates/src/trunk/src/radiance_core/augment_tiled_radiance.F90 -atmos_param/socrates/src/trunk/src/radiance_core/column_solver.F90 -atmos_param/socrates/src/trunk/src/radiance_core/augment_radiance.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_control.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff_basic.F90 -atmos_param/socrates/src/trunk/src/radiance_core/sph_solver.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_no_scat.F90 -atmos_param/socrates/src/trunk/src/radiance_core/copy_clr_sol.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solar_source.F90 -atmos_param/socrates/src/trunk/src/radiance_core/opt_prop_water_cloud.F90 -atmos_param/socrates/src/trunk/src/radiance_core/legendre_weight.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_without_gas.F90 -atmos_param/socrates/src/trunk/src/radiance_core/diff_albedo_basis.F90 -atmos_param/socrates/src/trunk/src/radiance_core/increment_rad_cf.F90 -atmos_param/socrates/src/trunk/src/radiance_core/single_scat_sol.F90 -atmos_param/socrates/src/trunk/src/radiance_core/opt_prop_aerosol.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solve_band_ses.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_ss_prop.F90 -atmos_param/socrates/src/trunk/src/radiance_core/prsc_opt_prop.F90 -atmos_param/socrates/src/trunk/src/radiance_core/layer_part_integ.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff_fast_lw.F90 -atmos_param/socrates/src/trunk/src/radiance_core/gas_optical_properties.F90 -atmos_param/socrates/src/trunk/src/radiance_core/single_scattering.F90 -atmos_param/socrates/src/trunk/src/radiance_core/monochromatic_ir_radiance.F90 -atmos_param/socrates/src/trunk/src/radiance_core/hemi_sph_integ.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff_cloud.F90 -atmos_param/socrates/src/trunk/src/radiance_core/read_spectrum.F90 -atmos_param/socrates/src/trunk/src/radiance_core/inter_t_lookup.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_triple.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_stream.F90 -atmos_param/socrates/src/trunk/src/radiance_core/solver_triple_hogan.F90 -atmos_param/socrates/src/trunk/src/radiance_core/monochromatic_radiance_tseq.F90 -atmos_param/socrates/src/trunk/src/radiance_core/cloud_maxcs_split.F90 -atmos_param/socrates/src/trunk/src/radiance_core/def_atm.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff_region.F90 -atmos_param/socrates/src/trunk/src/radiance_core/quicksort.F90 -atmos_param/socrates/src/trunk/src/radiance_core/rescale_tau_omega.F90 -atmos_param/socrates/src/trunk/src/radiance_core/calc_radiance_ipa.F90 -atmos_param/socrates/src/trunk/src/radiance_core/two_coeff_region_fast_lw.F90 -atmos_param/socrates/src/trunk/src/radiance_core/diff_planck_source_poly.F90 -atmos_param/socrates/src/trunk/src/radiance_core/set_truncation.F90 -atmos_param/socrates/src/trunk/src/radiance_core/monochromatic_radiance.F90 -atmos_param/socrates/src/trunk/src/radiance_core/aggregate_cloud.F90 -atmos_param/socrates/src/trunk/src/radiance_core/radiance_calc.F90 -atmos_param/socrates/src/trunk/src/radiance_core/ir_source.F90 -atmos_param/socrates/src/trunk/src/scatter/conjugate_gradient_cloud_90.f90 -atmos_param/socrates/src/trunk/src/scatter/method_weight_pcf.f90 -atmos_param/socrates/src/trunk/src/scatter/select_weight_scatter_90.f90 -atmos_param/socrates/src/trunk/src/scatter/measure_particle_pcf.f90 -atmos_param/socrates/src/trunk/src/scatter/prec_integral_tcf.f90 -atmos_param/socrates/src/trunk/src/scatter/def_s_scat_prop.f90 -atmos_param/socrates/src/trunk/src/scatter/db_scatter_integral.f90 -atmos_param/socrates/src/trunk/src/scatter/weightings_90.f90 -atmos_param/socrates/src/trunk/src/scatter/def_db_ss_mono.f90 -atmos_param/socrates/src/trunk/src/scatter/cloud_fitting.f90 -atmos_param/socrates/src/trunk/src/scatter/shape_particle_pcf.f90 -atmos_param/socrates/src/trunk/src/scatter/number_particle_90.f90 -atmos_param/socrates/src/trunk/src/scatter/db_interp_ss_mono.f90 -atmos_param/socrates/src/trunk/src/scatter/db_read_single_wavelength.f90 -atmos_param/socrates/src/trunk/src/scatter/get_refract_index.f90 -atmos_param/socrates/src/trunk/src/scatter/read_scatter_block_90.f90 -atmos_param/socrates/src/trunk/src/scatter/proj_area_particle.f90 -atmos_param/socrates/src/trunk/src/scatter/line_search_cloud_90.f90 -atmos_param/socrates/src/trunk/src/scatter/volume_particle.f90 -atmos_param/socrates/src/trunk/src/scatter/distribution_pcf.f90 -atmos_param/socrates/src/trunk/src/scatter/size_integral_90.f90 -atmos_param/socrates/src/trunk/src/scatter/particle_size_90.f90 -atmos_param/socrates/src/trunk/src/scatter/max_size_acf.f90 -atmos_param/socrates/src/trunk/src/scatter/write_average_90.f90 -atmos_param/socrates/src/trunk/src/scatter/adt_mitchell96.f90 -atmos_param/socrates/src/trunk/src/scatter/get_db_wavelengths.f90 -atmos_param/socrates/src/trunk/src/scatter/decompose_phf_90.f90 -atmos_param/socrates/src/trunk/src/scatter/cloud_fit_parm_acf.f90 -atmos_param/socrates/src/trunk/src/scatter/cloud_fit_90.f90 -atmos_param/socrates/src/trunk/src/scatter/ice_db_read_geometry.f90 -atmos_param/socrates/src/trunk/src/scatter/def_sct_db.f90 -atmos_param/socrates/src/trunk/src/scatter/open_average_90.f90 -atmos_param/socrates/src/trunk/src/scatter/def_size_dist.f90 -atmos_param/socrates/src/trunk/src/scatter/parm_integ_acf.f90 -atmos_param/socrates/src/trunk/src/scatter/bna_factor_ccf.f90 -atmos_param/socrates/src/trunk/src/scatter/def_db_crystal_geometry.f90 -atmos_param/socrates/src/trunk/src/scatter/get_wavelengths.f90 -atmos_param/socrates/src/trunk/src/scatter/weightings_single_90.f90 -atmos_param/socrates/src/trunk/src/scatter/scatter_algorithm_pcf.f90 -atmos_param/socrates/src/trunk/src/scatter/db_type_ucf.f90 -atmos_param/socrates/src/trunk/src/scatter/scatter_integral_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/voigt_profile.f90 -atmos_param/socrates/src/trunk/src/correlated_k/adjust_path.f90 -atmos_param/socrates/src/trunk/src/correlated_k/func_scale_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/read_pt_line_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/set_condition_ck_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/caviar_continuum_v1_0.f90 -atmos_param/socrates/src/trunk/src/correlated_k/rad_weight_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/select_weight_ck_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/trans_k_dist.f90 -atmos_param/socrates/src/trunk/src/correlated_k/type_residual_pcf.f90 -atmos_param/socrates/src/trunk/src/correlated_k/map_shell.f90 -atmos_param/socrates/src/trunk/src/correlated_k/terminate_scale_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/ckd_continuum_v2_4.f90 -atmos_param/socrates/src/trunk/src/correlated_k/write_fit_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/ck_parm_acf.f90 -atmos_param/socrates/src/trunk/src/correlated_k/fit_parabola_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/func_scale_derivative_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/optimal_k.f90 -atmos_param/socrates/src/trunk/src/correlated_k/open_file_out_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/residual_gradient_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/scale_ck_fit_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/read_ref_pt_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/corr_k_single.f90 -atmos_param/socrates/src/trunk/src/correlated_k/planck_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/exponent_fit_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/conjugate_gradient_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/line_prof_corr_mod.f90 -atmos_param/socrates/src/trunk/src/correlated_k/set_extern_ckd_frn_data.f90 -atmos_param/socrates/src/trunk/src/correlated_k/set_g_point_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/bi_interp.f90 -atmos_param/socrates/src/trunk/src/correlated_k/residual_trans_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/set_extern_ckd_self_data.f90 -atmos_param/socrates/src/trunk/src/correlated_k/line_search_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/read_hitran.f90 -atmos_param/socrates/src/trunk/src/correlated_k/read_nc.f90 -atmos_param/socrates/src/trunk/src/correlated_k/ckd_extern_data.f90 -atmos_param/socrates/src/trunk/src/correlated_k/def_hitran_record.f90 -atmos_param/socrates/src/trunk/src/correlated_k/d_planck_90.f90 -atmos_param/socrates/src/trunk/src/correlated_k/scale_parameters_acf.f90 -atmos_param/socrates/src/trunk/src/correlated_k/offset_residual_trans_acf.f90 -atmos_param/socrates/src/trunk/src/correlated_k/hitran_cnst.f90 -atmos_param/socrates/src/trunk/src/correlated_k/ck_fit_pcf.f90 -atmos_param/socrates/src/trunk/src/aux/qsat_wat.F90 -atmos_param/socrates/src/trunk/src/aux/qsat_gill.F90 -atmos_param/socrates/src/trunk/src/aux/write_cdf.f90 -atmos_param/socrates/src/trunk/src/aux/read_cdf.f90 -atmos_param/socrates/src/trunk/src/aux/aerosol_representation_pcf.f90 -atmos_param/socrates/src/trunk/src/aux/aerosol_profile_pcf.f90 -atmos_param/socrates/src/trunk/src/aux/write_samson.f90 -atmos_param/socrates/src/trunk/src/aux/filter_function.f90 -atmos_param/socrates/src/trunk/src/aux/qsat_alg_pcf.f90 -atmos_param/socrates/src/trunk/src/aux/method_merge_pcf.f90 -atmos_param/socrates/src/trunk/src/aux/rand_gauss.f90 -atmos_param/socrates/src/trunk/src/general/make_block_2_1.f90 -atmos_param/socrates/src/trunk/src/general/make_block_11.f90 -atmos_param/socrates/src/trunk/src/general/make_block_12.f90 -atmos_param/socrates/src/trunk/src/general/sum_unity.f90 -atmos_param/socrates/src/trunk/src/general/trapezoid_90.f90 -atmos_param/socrates/src/trunk/src/general/get_free_unit.F90 -atmos_param/socrates/src/trunk/src/general/rayleigh_scatter.f90 -atmos_param/socrates/src/trunk/src/general/make_block_18.f90 -atmos_param/socrates/src/trunk/src/general/remove_negative_gas_90.f90 -atmos_param/socrates/src/trunk/src/general/make_block_17.f90 -atmos_param/socrates/src/trunk/src/general/make_block_1.f90 -atmos_param/socrates/src/trunk/src/general/solar_intensity_90.f90 -atmos_param/socrates/src/trunk/src/general/make_block_19.f90 -atmos_param/socrates/src/trunk/src/general/make_block_0.f90 -atmos_param/socrates/src/trunk/src/general/make_block_10.f90 -atmos_param/socrates/src/trunk/src/general/make_block_14.f90 -atmos_param/socrates/src/trunk/src/general/read_solar_spectrum.f90 -atmos_param/socrates/src/trunk/src/general/remove_negative_cont_90.f90 -atmos_param/socrates/src/trunk/src/general/make_block_3_1.f90 -atmos_param/socrates/src/trunk/src/general/set_interactive.f90 -atmos_param/socrates/src/trunk/src/general/make_block_8.f90 -atmos_param/socrates/src/trunk/src/general/make_block_3.f90 -atmos_param/socrates/src/trunk/src/general/make_block_15.f90 -atmos_param/socrates/src/trunk/src/general/make_block_9.f90 -atmos_param/socrates/src/trunk/src/general/read_instrument_response_90.f90 -atmos_param/socrates/src/trunk/src/general/make_block_4.f90 -atmos_param/socrates/src/trunk/src/general/map_heap_func.f90 -atmos_param/socrates/src/trunk/src/general/make_block_6.f90 -atmos_param/socrates/src/trunk/src/general/out_spectrum.f90 -atmos_param/socrates/src/trunk/src/general/make_block_2.f90 -atmos_param/socrates/src/trunk/src/general/rayleigh_jeans_tail.f90 -atmos_param/socrates/src/trunk/src/general/solar_intensity.f90 -atmos_param/socrates/src/trunk/src/general/make_block_5.f90 -atmos_param/socrates/src/trunk/src/general/rayleigh_scatter_h2he.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_field_cdf_ucf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/def_refract.f90 -atmos_param/socrates/src/trunk/src/modules_gen/scatter_pp_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/def_std_io_icf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_cdl_ucf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/refract_re_ccf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/def_inst_flt.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_pp_ucf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/weighting_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/error_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/file_type_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/def_data_in_icf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_cdf_ucf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/unit_list_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/realtypefx_rd.f90 -atmos_param/socrates/src/trunk/src/modules_gen/def_solarspec.f90 -atmos_param/socrates/src/trunk/src/modules_gen/interp_mode_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_fixed_pcf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/dimensions_field_ucf.f90 -atmos_param/socrates/src/trunk/src/modules_gen/input_head_pcf.f90 -atmos_param/socrates/src/trunk/src/radiation_control/close_cloud_gen.F90 -atmos_param/socrates/src/trunk/src/radiation_control/mcica_order.F90 -atmos_param/socrates/src/trunk/src/radiation_control/rand_no_mcica.F90 -atmos_param/socrates/src/trunk/src/radiation_control/set_moist_aerosol_properties.F90 -atmos_param/socrates/src/trunk/src/radiation_control/mcica_mod.F90 -atmos_param/socrates/src/trunk/src/radiation_control/cld_generator_mod.F90 -atmos_param/socrates/src/trunk/src/radiation_control/open_cloud_gen.F90 -atmos_param/socrates/src/trunk/src/um/out_nml.f90 -atmos_param/socrates/src/trunk/src/um/def_um_nml.f90 -atmos_param/socrates/src/trunk/src/modules_core/errormessagelength_mod.F90 -atmos_param/socrates/src/trunk/src/modules_core/dimensions_spec_ucf.F90 -atmos_param/socrates/src/trunk/src/modules_core/rad_ccf.F90 -atmos_param/socrates/src/trunk/src/modules_core/yomhook.F90 -atmos_param/socrates/src/trunk/src/modules_core/parkind1.F90 -atmos_param/socrates/src/trunk/src/modules_core/file_manager.F90 -atmos_param/socrates/src/trunk/src/modules_core/missing_data_mod.F90 -atmos_param/socrates/src/trunk/src/modules_core/vectlib_mod.F90 -atmos_param/socrates/src/trunk/src/modules_core/ereport_mod.F90 -atmos_param/socrates/src/trunk/src/modules_core/realtype_rd.f90 -atmos_param/socrates/src/trunk/src/modules_core/filenamelength_mod.F90 -atmos_param/socrates/src/trunk/src/scatter/grow_particles.f -atmos_param/socrates/src/trunk/src/scatter/mie_scatter.f -atmos_param/socrates/src/trunk/src/scatter/adt_integral.f -atmos_param/socrates/src/trunk/src/scatter/gamma_fnc.f -atmos_param/socrates/src/trunk/src/scatter/refractive_index.f -atmos_param/socrates/src/trunk/src/aux/output_vert_cdl.f -atmos_param/socrates/src/trunk/src/aux/assign_input_opt_cdf.f -atmos_param/socrates/src/trunk/src/aux/assign_input_ss_cdl.f -atmos_param/socrates/src/trunk/src/aux/split_cdl_line.f -atmos_param/socrates/src/trunk/src/aux/input_cloud_cdf.f -atmos_param/socrates/src/trunk/src/aux/assign_viewing_geom_cdl.f -atmos_param/socrates/src/trunk/src/aux/read_samson_p_field.f -atmos_param/socrates/src/trunk/src/aux/output_opt_profile_cdl.f -atmos_param/socrates/src/trunk/src/aux/input_cloud_cdl.f -atmos_param/socrates/src/trunk/src/aux/output_radiance_cdl.f -atmos_param/socrates/src/trunk/src/aux/fnc_density.f -atmos_param/socrates/src/trunk/src/aux/calc_volume_fraction.f -atmos_param/socrates/src/trunk/src/aux/calc_cdl_stride.f -atmos_param/socrates/src/trunk/src/aux/interp.f -atmos_param/socrates/src/trunk/src/aux/merge_pressure.f -atmos_param/socrates/src/trunk/src/aux/angular_control_cdf.f -atmos_param/socrates/src/trunk/src/aux/extinction_profile.f -atmos_param/socrates/src/trunk/src/aux/read_genln2_flux.f -atmos_param/socrates/src/trunk/src/aux/write_cdl.f -atmos_param/socrates/src/trunk/src/aux/find_var_cdl.f -atmos_param/socrates/src/trunk/src/aux/assign_input_vert_cdf.f -atmos_param/socrates/src/trunk/src/aux/input_aerosol_cdf.f -atmos_param/socrates/src/trunk/src/aux/assign_input_novert_cdl.f -atmos_param/socrates/src/trunk/src/aux/find_dimen_cdl.f -atmos_param/socrates/src/trunk/src/aux/output_flux_cdl.f -atmos_param/socrates/src/trunk/src/aux/assign_input_opt_cdl.f -atmos_param/socrates/src/trunk/src/aux/output_horiz_cdl.f -atmos_param/socrates/src/trunk/src/aux/seaalbedo_driver.f -atmos_param/socrates/src/trunk/src/aux/assign_viewing_geom_cdf.f -atmos_param/socrates/src/trunk/src/aux/angular_control.f -atmos_param/socrates/src/trunk/src/aux/output_vert_cdf.f -atmos_param/socrates/src/trunk/src/aux/output_view_cdl.f -atmos_param/socrates/src/trunk/src/aux/read_raw_profile.f -atmos_param/socrates/src/trunk/src/aux/qsat_gg_ice.f -atmos_param/socrates/src/trunk/src/aux/output_flux_cdf.f -atmos_param/socrates/src/trunk/src/aux/assign_surface_char_cdf.f -atmos_param/socrates/src/trunk/src/aux/name_length.f -atmos_param/socrates/src/trunk/src/aux/sort_raw_profile.f -atmos_param/socrates/src/trunk/src/aux/read_averaged_scatter.f -atmos_param/socrates/src/trunk/src/aux/write_cdl_field.f -atmos_param/socrates/src/trunk/src/aux/planck_ss_source.f -atmos_param/socrates/src/trunk/src/aux/output_photolysis_cdf.f -atmos_param/socrates/src/trunk/src/aux/output_radiance_cdf.f -atmos_param/socrates/src/trunk/src/aux/interpolate_p.f -atmos_param/socrates/src/trunk/src/aux/write_profile.f -atmos_param/socrates/src/trunk/src/aux/assign_surface_char_cdl.f -atmos_param/socrates/src/trunk/src/aux/planck_cumul.f -atmos_param/socrates/src/trunk/src/aux/input_aerosol_cdl.f -atmos_param/socrates/src/trunk/src/aux/assign_input_novert_cdf.f -atmos_param/socrates/src/trunk/src/aux/output_surf_cdl.f -atmos_param/socrates/src/trunk/src/aux/mono_rad_ss.f -atmos_param/socrates/src/trunk/src/aux/assign_horiz_cdl.f -atmos_param/socrates/src/trunk/src/aux/qsat.f -atmos_param/socrates/src/trunk/src/aux/set_state.f -atmos_param/socrates/src/trunk/src/aux/l_find_component.f -atmos_param/socrates/src/trunk/src/aux/qsat_gg.f -atmos_param/socrates/src/trunk/src/aux/read_cdl.f -atmos_param/socrates/src/trunk/src/aux/assign_input_vert_cdl.f -atmos_param/socrates/src/trunk/src/aux/output_photolysis_cdl.f -atmos_param/socrates/src/trunk/src/general/non_blank.f -atmos_param/socrates/src/trunk/src/general/remove_blank.f -atmos_param/socrates/src/trunk/src/general/simpsons_rule.f -atmos_param/socrates/src/trunk/src/general/point_bracket.f -atmos_param/socrates/src/trunk/src/general/trapezoid.f -atmos_param/socrates/src/trunk/src/general/planck.f -atmos_param/socrates/src/trunk/src/general/read_line.f -atmos_param/socrates/src/trunk/src/general/make_block_6_1.f -atmos_param/socrates/src/trunk/src/general/calc_thermal_coeff.f -atmos_param/socrates/src/trunk/src/general/open_file_out.f -atmos_param/socrates/src/trunk/src/general/back_substitute.f -atmos_param/socrates/src/trunk/src/general/open_file_in.f -atmos_param/socrates/src/trunk/src/general/integrate_spline.f -atmos_param/socrates/src/trunk/src/general/rayleigh_scatter_air.f -atmos_param/socrates/src/trunk/src/general/lock_code.f -atmos_param/socrates/src/trunk/src/general/make_block_6_2.f -atmos_param/socrates/src/trunk/src/general/inner_bracket.f -atmos_param/socrates/src/trunk/src/general/svd_decompose.f -atmos_param/socrates/src/trunk/src/general/calc_planck_tbl.f -atmos_param/socrates/src/trunk/src/general/read_word.f atmos_param/socrates/interface/read_control.F90 atmos_param/socrates/interface/set_atm.F90 atmos_param/socrates/interface/set_cld.F90 diff --git a/src/extra/python/isca/codebase.py b/src/extra/python/isca/codebase.py index 043803143..ea75af8a1 100644 --- a/src/extra/python/isca/codebase.py +++ b/src/extra/python/isca/codebase.py @@ -40,7 +40,11 @@ def modify_exec_name(self): self.executable_name = 'soc_isca.x' else: self.executable_name = f'soc_isca_{self.socrates_version}.x' - + elif self.__class__==SocColumnCodeBase: + if self.socrates_version == '1703': + self.executable_name = 'soc_column_isca.x' + else: + self.executable_name = f'soc_column_isca_{self.socrates_version}.x' def __init__(self, repo=None, commit=None, directory=None, storedir=P(GFDL_WORK, 'codebase'), safe_mode=False, socrates_version='1703'): """Create a new CodeBase object. @@ -363,7 +367,7 @@ def simlink_to_soc_code(self): raise OSError(error_mesg) def read_version_specific_paths(self): - self.extra_path_names = self.read_path_names(P(self.srcdir, 'extra', 'model', self.name, 'socrates_version_paths', self.socrates_version)) + self.extra_path_names = self.read_path_names(P(self.srcdir, 'extra', 'model', 'socrates', 'socrates_version_paths', self.socrates_version)) def __init__(self, *args, **kwargs): super(SocratesCodeBase, self).__init__(*args, **kwargs) @@ -371,58 +375,19 @@ def __init__(self, *args, **kwargs): self.simlink_to_soc_code() self.read_version_specific_paths() -class SocColumnCodeBase(CodeBase): +class SocColumnCodeBase(SocratesCodeBase): """Isca without RRTM but with the Met Office radiation scheme, Socrates. THIS VERSION FOR SINGLE COLUMN USE. """ - #path_names_file = P(_module_directory, 'templates', 'moist_path_names') name = 'socrates_column' - executable_name = 'soc_column_isca.x' + executable_name = None def column_model(self): self.compile_flags.append('-DCOLUMN_MODEL') self.log.info('USING SINGLE COLUMN MODEL') - def disable_rrtm(self): - # add no compile flag - self.compile_flags.append('-DRRTM_NO_COMPILE') - self.log.info('RRTM compilation disabled.') - - def simlink_to_soc_code(self): - #Make symlink to socrates source code if one doesn't already exist. - socrates_desired_location = self.codedir+'/src/atmos_param/socrates/src/trunk' - - #First check if socrates is in correct place already - if os.path.exists(socrates_desired_location): - link_correct = os.path.exists(socrates_desired_location+'/src/') - if link_correct: - socrates_code_in_desired_location=True - else: - socrates_code_in_desired_location=False - if os.path.islink(socrates_desired_location): - self.log.info('Socrates source code symlink is in correct place, but is to incorrect location. Trying to correct.') - os.unlink(socrates_desired_location) - else: - self.log.info('Socrates source code is in correct place, but folder structure is wrong. Contents of the folder '+socrates_desired_location+' should include a src folder.') - else: - socrates_code_in_desired_location=False - self.log.info('Socrates source code symlink does not exist. Creating.') - - # If socrates is not in the right place already, then attempt to make symlink to location of code provided by GFDL_SOC - if socrates_code_in_desired_location: - self.log.info('Socrates source code already in correct place. Continuing.') - else: - if GFDL_SOC is not None: - sh.ln('-s', GFDL_SOC, socrates_desired_location) - elif GFDL_SOC is None: - error_mesg = 'Socrates code is required for SocratesCodebase, but source code is not provided in location GFDL_SOC='+ str(GFDL_SOC) - self.log.error(error_mesg) - raise OSError(error_mesg) - def __init__(self, *args, **kwargs): super(SocColumnCodeBase, self).__init__(*args, **kwargs) self.column_model() - self.disable_rrtm() - self.simlink_to_soc_code() class GreyCodeBase(CodeBase): """The Frierson model. @@ -452,10 +417,9 @@ def __init__(self, *args, **kwargs): self.disable_rrtm() self.disable_soc() -class ColumnCodeBase(CodeBase): +class ColumnCodeBase(IscaCodeBase): """This contains code that will allow one to use all model physics in a single column configuration (i.e. without calling the dynamical core) """ - #path_names_file = P(_module_directory, 'templates', 'moist_path_names') name = 'column' executable_name = 'column_isca.x' @@ -463,15 +427,9 @@ def column_model(self): self.compile_flags.append('-DCOLUMN_MODEL') self.log.info('USING SINGLE COLUMN MODEL') - def disable_soc(self): - # add no compile flag - self.compile_flags.append('-DSOC_NO_COMPILE') - self.log.info('SOCRATES compilations diabled.') - def __init__(self, *args, **kwargs): super(ColumnCodeBase, self).__init__(*args, **kwargs) self.column_model() - self.disable_soc() class DryCodeBase(GreyCodeBase): """The Held-Suarez model.