lib/gs2crmod/calculations.rb in gs2crmod-0.12.6 vs lib/gs2crmod/calculations.rb in gs2crmod-0.12.7
- old
+ new
@@ -22,28 +22,36 @@
return unless FileTest.exist?(netcdf_filename)
@hflux_tot_stav = saturated_time_average('hflux_tot_over_time', {})
@hflux_tot_stav_error = saturated_time_average_error('hflux_tot_over_time', {})
@hflux_tot_stav_std_dev = saturated_time_average_std_dev('hflux_tot_over_time', {})
@phi2_tot_stav = saturated_time_average('phi2tot_over_time', {})
- #@par_mom_flux_stav = saturated_time_average('par_mom_flux_over_time', {}) rescue nil
- #@perp_mom_flux_stav = saturated_time_average('perp_mom_flux_over_time', {}) rescue nil
+
+ @es_part_flux_stav = {}
@es_mom_flux_stav = {}
@es_heat_flux_stav = {}
+
+ @es_part_flux_stav_error = {}
@es_mom_flux_stav_error = {}
- @es_mom_flux_stav_std_dev = {}
@es_heat_flux_stav_error = {}
+
+ @es_part_flux_stav_std_dev = {}
+ @es_mom_flux_stav_std_dev = {}
@es_heat_flux_stav_std_dev = {}
@nspec.times do |i|
species_index = i + 1
+ @es_part_flux_stav[species_index] = saturated_time_average('es_part_flux_over_time', {species_index: species_index})
@es_mom_flux_stav[species_index] = saturated_time_average('es_mom_flux_over_time', {species_index: species_index})
@es_heat_flux_stav[species_index] = saturated_time_average('es_heat_flux_over_time', {species_index: species_index})
+
+ @es_part_flux_stav_error[species_index] = saturated_time_average_error('es_part_flux_over_time', {species_index: species_index})
@es_mom_flux_stav_error[species_index] = saturated_time_average_error('es_mom_flux_over_time', {species_index: species_index})
- @es_mom_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_heat_flux_over_time', {species_index: species_index})
@es_heat_flux_stav_error[species_index] = saturated_time_average_error('es_heat_flux_over_time', {species_index: species_index})
+
+ @es_part_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_part_flux_over_time', {species_index: species_index})
+ @es_mom_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_mom_flux_over_time', {species_index: species_index})
@es_heat_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_heat_flux_over_time', {species_index: species_index})
end
-# ep @es_mom_flux_stav, @es_heat_flux_stav
end
alias :ctaf :calculate_time_averaged_fluxes
def saturated_time_average(name, options)