ginput 1.4.0__tar.gz → 1.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. {ginput-1.4.0/ginput.egg-info → ginput-1.4.2}/PKG-INFO +7 -13
  2. {ginput-1.4.0 → ginput-1.4.2}/README.md +6 -12
  3. ginput-1.4.2/ginput/__init__.py +3 -0
  4. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/versioning.py +10 -8
  5. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/acos_interface.py +11 -9
  6. ginput-1.4.2/ginput/priors/fo2_prep.py +493 -0
  7. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/mlo_smo_prep.py +10 -2
  8. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/tccon_priors.py +33 -16
  9. {ginput-1.4.0 → ginput-1.4.2/ginput.egg-info}/PKG-INFO +7 -13
  10. {ginput-1.4.0 → ginput-1.4.2}/ginput.egg-info/SOURCES.txt +0 -18
  11. {ginput-1.4.0 → ginput-1.4.2}/setup.py +1 -1
  12. ginput-1.4.0/ginput/__init__.py +0 -4
  13. ginput-1.4.0/ginput/data/ch4_strat_lut.nc +0 -0
  14. ginput-1.4.0/ginput/data/co2_strat_lut.nc +0 -0
  15. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20240801T165356/co2_annmean_gl.txt +0 -84
  16. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20240801T165356/monthly_o2_alt.csv +0 -455
  17. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20240801T165356/monthly_o2_cgo.csv +0 -431
  18. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20240801T165356/monthly_o2_ljo.csv +0 -455
  19. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250109T183031/co2_annmean_gl.txt +0 -84
  20. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250109T183031/monthly_o2_alt.csv +0 -455
  21. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250109T183031/monthly_o2_cgo.csv +0 -431
  22. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250109T183031/monthly_o2_ljo.csv +0 -455
  23. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250324T222356/co2_annmean_gl.txt +0 -85
  24. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250324T222356/monthly_o2_alt.csv +0 -455
  25. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250324T222356/monthly_o2_cgo.csv +0 -431
  26. ginput-1.4.0/ginput/data/fo2_data/fo2_inputs_20250324T222356/monthly_o2_ljo.csv +0 -455
  27. ginput-1.4.0/ginput/data/hf_strat_lut.nc +0 -0
  28. ginput-1.4.0/ginput/data/n2o_strat_lut.nc +0 -0
  29. ginput-1.4.0/ginput/data/o2_mean_dmf.dat +0 -59
  30. ginput-1.4.0/ginput/data/o2_mean_dmf.dat.bak20250324T2223 +0 -52
  31. ginput-1.4.0/ginput/priors/fo2_prep.py +0 -341
  32. {ginput-1.4.0 → ginput-1.4.2}/LICENSE.txt +0 -0
  33. {ginput-1.4.0 → ginput-1.4.2}/MANIFEST.in +0 -0
  34. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/__init__.py +0 -0
  35. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/ggg_logging.py +0 -0
  36. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/ioutils.py +0 -0
  37. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/mod_constants.py +0 -0
  38. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/mod_utils.py +0 -0
  39. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/readers.py +0 -0
  40. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/run_utils.py +0 -0
  41. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/sat_utils.py +0 -0
  42. {ginput-1.4.0 → ginput-1.4.2}/ginput/common_utils/writers.py +0 -0
  43. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/.gitignore +0 -0
  44. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/GEOS_FPIT_lat_vs_theta_2018_500-700hPa.nc +0 -0
  45. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ML_monthly_obs_ch4.txt +0 -0
  46. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ML_monthly_obs_co.txt +0 -0
  47. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ML_monthly_obs_co2.txt +0 -0
  48. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ML_monthly_obs_n2o.txt +0 -0
  49. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/SMO_monthly_obs_ch4.txt +0 -0
  50. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/SMO_monthly_obs_co.txt +0 -0
  51. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/SMO_monthly_obs_co2.txt +0 -0
  52. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/SMO_monthly_obs_n2o.txt +0 -0
  53. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ace_fn2o_lut.nc +0 -0
  54. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/age.midlat.txt +0 -0
  55. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/age.tropics.txt +0 -0
  56. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/age.vortex.txt +0 -0
  57. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/agespec.midlat.txt +0 -0
  58. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/agespec.tropics.txt +0 -0
  59. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/agespec.vortex.txt +0 -0
  60. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/age_spectra/time.txt +0 -0
  61. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/ch4_hf_slopes.nc +0 -0
  62. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/clams_age_clim_scaled.nc +0 -0
  63. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/fo2_data/.gitignore +0 -0
  64. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/isotopologs.dat +0 -0
  65. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/meso_co_lut.nc +0 -0
  66. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/n2o_ch4_acefts.nc +0 -0
  67. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/ch4_mko_surface-flask_1_ccgg_event.txt +0 -0
  68. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/ch4_mko_surface-pfp_1_ccgg_event.txt +0 -0
  69. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/ch4_mlo_surface-flask_1_ccgg_month.txt +0 -0
  70. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/ch4_mlo_surface-insitu_1_ccgg_MonthlyData.txt +0 -0
  71. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/ch4_smo_surface-flask_1_ccgg_month.txt +0 -0
  72. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_mko_surface-flask_1_ccgg_event.txt +0 -0
  73. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_mko_surface-pfp_1_ccgg_event.txt +0 -0
  74. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_mlo_surface-flask_1_ccgg_month.txt +0 -0
  75. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_mlo_surface-insitu_1_ccgg_MonthlyData.txt +0 -0
  76. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_smo_surface-flask_1_ccgg_month.txt +0 -0
  77. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/co2_smo_surface-insitu_1_ccgg_MonthlyData.txt +0 -0
  78. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/mlo_n2o_mm_cats_gc.dat +0 -0
  79. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/mlo_n2o_mm_rits_gc.dat +0 -0
  80. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/n2o_mko_surface-flask_1_ccgg_event.txt +0 -0
  81. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/n2o_mko_surface-pfp_1_ccgg_event.txt +0 -0
  82. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/n2o_mlo_surface-flask_1_ccgg_month.txt +0 -0
  83. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/n2o_smo_surface-flask_1_ccgg_month.txt +0 -0
  84. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/smo_n2o_mm_cats_gc.dat +0 -0
  85. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/noaa_data/20250507/smo_n2o_mm_rits_gc.dat +0 -0
  86. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/summer_35N.vmr +0 -0
  87. {ginput-1.4.0 → ginput-1.4.2}/ginput/data/washenfelder03_table_s3.txt +0 -0
  88. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/__init__.py +0 -0
  89. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/download_utils.py +0 -0
  90. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/get_GEOS5.py +0 -0
  91. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/get_MERRA2.py +0 -0
  92. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/get_NOAA_flask_data.py +0 -0
  93. {ginput-1.4.0 → ginput-1.4.2}/ginput/download/get_fo2_data.py +0 -0
  94. {ginput-1.4.0 → ginput-1.4.2}/ginput/mod_maker/__init__.py +0 -0
  95. {ginput-1.4.0 → ginput-1.4.2}/ginput/mod_maker/mod_maker.py +0 -0
  96. {ginput-1.4.0 → ginput-1.4.2}/ginput/mod_maker/slantify.py +0 -0
  97. {ginput-1.4.0 → ginput-1.4.2}/ginput/mod_maker/tccon_sites.py +0 -0
  98. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/__init__.py +0 -0
  99. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/automation.py +0 -0
  100. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/__init__.py +0 -0
  101. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/ace_fts_analysis.py +0 -0
  102. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/ace_fts_val.py +0 -0
  103. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/acos_comparison.py +0 -0
  104. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/aircraft_aircore_val.py +0 -0
  105. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/aircraft_preprocessing.py +0 -0
  106. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/atmos_mkiv_val.py +0 -0
  107. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/backend_driver.py +0 -0
  108. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/backend_utils.py +0 -0
  109. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/clams.py +0 -0
  110. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/create_test_priors.py +0 -0
  111. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/geos_theta_lat.py +0 -0
  112. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/mls_val.py +0 -0
  113. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/backend_analysis/retrieval_obs_val.py +0 -0
  114. {ginput-1.4.0 → ginput-1.4.2}/ginput/priors/map_maker.py +0 -0
  115. {ginput-1.4.0 → ginput-1.4.2}/ginput.egg-info/dependency_links.txt +0 -0
  116. {ginput-1.4.0 → ginput-1.4.2}/ginput.egg-info/requires.txt +0 -0
  117. {ginput-1.4.0 → ginput-1.4.2}/ginput.egg-info/top_level.txt +0 -0
  118. {ginput-1.4.0 → ginput-1.4.2}/pyproject.toml +0 -0
  119. {ginput-1.4.0 → ginput-1.4.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ginput
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: Python code that creates the .mod and .vmr files used in GGG
5
5
  Home-page:
6
6
  Author: Joshua Laughner, Sebastien Roche, Matthaeus Kiel
@@ -111,22 +111,16 @@ The full legal terms are contained in LICENSE.txt file. For a short summary, ple
111
111
  [here](https://choosealicense.com/licenses/apache-2.0/#). If you have any questions about
112
112
  use, please contact us (contact information is below).
113
113
 
114
- In addition to the Apache license, you should cite the ginput paper in any publications
115
- resulting from the use of ginput. (At time of release, the manuscript is still in preparation,
116
- so contact us for the citation.) Please also consider contacting us to let us know you are
117
- using ginput!
114
+ In addition to the Apache license, you should cite the ginput paper listed in the `CITATION.cff` file
115
+ in any publications resulting from the use of ginput. Please also consider contacting us to let us know
116
+ you are using ginput!
118
117
 
119
118
  ## Python support
120
119
 
121
120
  Only Python 3 is supported. Python 2 reached end-of-life on 1 Jan 2020.
122
- We also require that the `conda` package manager provided with the Anaconda
123
- Python distribution be installed, and so only officially support Anaconda or
124
- Miniconda Python.
125
-
126
- If you have Anaconda or Miniconda based on Python 2 installed, that should work,
127
- as ginput is configured to create a Python 3 environment for itself on install.
128
- This also ensures that it's dependencies do not conflict with your existing
129
- setup.
121
+ We also use the `conda` package manager in the install script, which is provided
122
+ by, e.g. miniforge.
123
+
130
124
 
131
125
  ## Contact
132
126
 
@@ -78,22 +78,16 @@ The full legal terms are contained in LICENSE.txt file. For a short summary, ple
78
78
  [here](https://choosealicense.com/licenses/apache-2.0/#). If you have any questions about
79
79
  use, please contact us (contact information is below).
80
80
 
81
- In addition to the Apache license, you should cite the ginput paper in any publications
82
- resulting from the use of ginput. (At time of release, the manuscript is still in preparation,
83
- so contact us for the citation.) Please also consider contacting us to let us know you are
84
- using ginput!
81
+ In addition to the Apache license, you should cite the ginput paper listed in the `CITATION.cff` file
82
+ in any publications resulting from the use of ginput. Please also consider contacting us to let us know
83
+ you are using ginput!
85
84
 
86
85
  ## Python support
87
86
 
88
87
  Only Python 3 is supported. Python 2 reached end-of-life on 1 Jan 2020.
89
- We also require that the `conda` package manager provided with the Anaconda
90
- Python distribution be installed, and so only officially support Anaconda or
91
- Miniconda Python.
92
-
93
- If you have Anaconda or Miniconda based on Python 2 installed, that should work,
94
- as ginput is configured to create a Python 3 environment for itself on install.
95
- This also ensures that it's dependencies do not conflict with your existing
96
- setup.
88
+ We also use the `conda` package manager in the install script, which is provided
89
+ by, e.g. miniforge.
90
+
97
91
 
98
92
  ## Contact
99
93
 
@@ -0,0 +1,3 @@
1
+ # be sure to update in setup.py as well
2
+ # and man/conf.py
3
+ __version__ = '1.4.2'
@@ -40,20 +40,20 @@ class GeosVersion:
40
40
  return False
41
41
  else:
42
42
  return self.version_str == other.version_str and self.source == other.source
43
-
43
+
44
44
  def __repr__(self):
45
45
  clsname = self.__class__.__name__
46
46
  return f'<{clsname}({self.source}, {self.version_str})>'
47
-
47
+
48
48
  def __str__(self):
49
49
  return f'{self.source.value} (GEOS v{self.version_str}) : {self.file_name} : {self.md5_checksum}'
50
-
50
+
51
51
  @classmethod
52
52
  def from_str(cls, s):
53
53
  parts = [x.strip() for x in s.split(':')]
54
54
  if len(parts) != 3:
55
55
  raise ValueError(f'"{s}" does not contain three substrings separated by colons')
56
-
56
+
57
57
  version, file_name, checksum = parts
58
58
  m = re.match(r'(\w+) \(GEOS v(\d+\.\d+\.\d+)\)', version)
59
59
  if m is None:
@@ -62,7 +62,7 @@ class GeosVersion:
62
62
  vstr = m.group(2)
63
63
  src_str = m.group(1)
64
64
  return cls(vstr, src_str, file_name, checksum)
65
-
65
+
66
66
  @classmethod
67
67
  def from_nc_file(cls, nc_file):
68
68
  file_name = os.path.basename(nc_file)
@@ -74,7 +74,7 @@ class GeosVersion:
74
74
  # where the "source" is the second component as divided by "."s.
75
75
  source_str = granule.split('.')[1]
76
76
  return cls(vstr, source_str, file_name, file_hash)
77
-
77
+
78
78
 
79
79
  def update_versioned_file_header(prev_file: Union[str, Path, Sequence[str]], new_data_descr: str, program_descr: str, source_files: Dict[str, Union[str, Path]],
80
80
  header_comment_symbol: str = '#', insert_line_index: int = 0):
@@ -186,6 +186,8 @@ class RollingBackup(ABC):
186
186
  dest_file
187
187
  The path to the backup created.
188
188
  """
189
+ if max_num_backups == 0:
190
+ return None
189
191
  src_file = Path(src_file)
190
192
  prev_backups = self._existing_backups(src_file)
191
193
  self._shuffle_backups(prev_backups, max_num_backups)
@@ -209,7 +211,7 @@ class RollingBackup(ABC):
209
211
  """
210
212
  if max_num_backups is None or len(prev_backups) < (max_num_backups - 1):
211
213
  return
212
-
214
+
213
215
  n_to_remove = len(prev_backups) - max_num_backups + 1
214
216
  for prev_backup in prev_backups[:n_to_remove]:
215
217
  os.remove(prev_backup)
@@ -244,7 +246,7 @@ class RollingBackupByDate(RollingBackup):
244
246
  date_str = datetime.now().strftime(self._date_fmt)
245
247
  new_name = f'{curr_name}.bak{date_str}'
246
248
  return src_file.with_name(new_name)
247
-
249
+
248
250
  def _existing_backups(self, src_file: Path) -> Sequence[Path]:
249
251
  src_dir = src_file.parent
250
252
  pattern = f'{src_file.name}.bak*'
@@ -311,11 +311,11 @@ def acos_interface_main(instrument, met_resampled_file, geos_files, output_file,
311
311
  if nprocs == 0:
312
312
  profiles, units = _prior_serial(orig_shape=orig_shape, var_mapping=var_mapping, var_type_info=var_type_info,
313
313
  met_data=met_data, gas_record=gas_record, prior_flags=gas_prior_flags,
314
- use_trop_eqlat=use_trop_eqlat, error_handler=error_handler)
314
+ use_trop_eqlat=use_trop_eqlat, fo2_file=fo2_file, error_handler=error_handler)
315
315
  else:
316
316
  profiles, units = _prior_parallel(orig_shape=orig_shape, var_mapping=var_mapping, var_type_info=var_type_info,
317
317
  met_data=met_data, gas_record=gas_record, prior_flags=gas_prior_flags, nprocs=nprocs,
318
- use_trop_eqlat=use_trop_eqlat, error_handler=error_handler)
318
+ use_trop_eqlat=use_trop_eqlat, fo2_file=fo2_file, error_handler=error_handler)
319
319
 
320
320
  # Add latitude, longitude, and flags to the priors file
321
321
  profiles['sounding_longitude'] = met_data['longitude']
@@ -355,7 +355,7 @@ def acos_interface_main(instrument, met_resampled_file, geos_files, output_file,
355
355
 
356
356
 
357
357
  def _prior_helper(i_sounding, i_foot, qflag, mod_data, gas_record, var_mapping, var_type_info, use_trop_eqlat=False,
358
- prior_flags=None, error_handler=_def_errh):
358
+ fo2_file=fo2_prep.DEFAULT_FO2_FILE, prior_flags=None, error_handler=_def_errh):
359
359
  """
360
360
  Underlying function that generates individual prior profiles in serial and parallel mode
361
361
 
@@ -428,10 +428,11 @@ def _prior_helper(i_sounding, i_foot, qflag, mod_data, gas_record, var_mapping,
428
428
  # which significantly overestimated the seasonal drawdown. The simple fix for now is to turn off
429
429
  # that adjustment.
430
430
  priors_dict, priors_units, priors_constants = tccon_priors.generate_single_tccon_prior(
431
- mod_data, dt.timedelta(hours=0), gas_record, use_eqlat_trop=use_trop_eqlat, use_adjusted_zgrid=False
431
+ mod_data, dt.timedelta(hours=0), gas_record, use_eqlat_trop=use_trop_eqlat, use_adjusted_zgrid=False,
432
+ o2_mole_fraction_file=fo2_file
432
433
  )
433
434
  except Exception as err:
434
- new_err = err.__class__(err.args[0] + ' Occurred at sounding = {}, footprint = {}'.format(i_sounding+1, i_foot+1))
435
+ new_err = err.__class__(str(err.args[0]) + ' Occurred at sounding = {}, footprint = {}'.format(i_sounding+1, i_foot+1))
435
436
  error_handler.handle_err(new_err, err_code_name='prior_failure', flags=prior_flags, inds=(i_sounding, i_foot))
436
437
  return profiles, None, prior_flags[i_sounding, i_foot]
437
438
 
@@ -506,7 +507,7 @@ def _make_output_profiles_dict(orig_shape, var_mapping, var_type_info):
506
507
 
507
508
 
508
509
  def _prior_serial(orig_shape, var_mapping, var_type_info, met_data, gas_record, prior_flags=None, use_trop_eqlat=False,
509
- error_handler=_def_errh):
510
+ fo2_file=fo2_prep.DEFAULT_FO2_FILE, error_handler=_def_errh):
510
511
  """
511
512
  Generate the priors, running in serial mode.
512
513
 
@@ -531,7 +532,7 @@ def _prior_serial(orig_shape, var_mapping, var_type_info, met_data, gas_record,
531
532
 
532
533
  this_profiles, this_units, _ = _prior_helper(i_sounding, i_foot, qflag, mod_data, gas_record,
533
534
  var_mapping, var_type_info, prior_flags=prior_flags,
534
- use_trop_eqlat=use_trop_eqlat, error_handler=error_handler)
535
+ use_trop_eqlat=use_trop_eqlat, fo2_file=fo2_file, error_handler=error_handler)
535
536
  for h5_var, h5_array in profiles.items():
536
537
  h5_array[i_sounding, i_foot, :] = this_profiles[h5_var]
537
538
  if not units_set and this_units is not None:
@@ -542,7 +543,7 @@ def _prior_serial(orig_shape, var_mapping, var_type_info, met_data, gas_record,
542
543
 
543
544
 
544
545
  def _prior_parallel(orig_shape, var_mapping, var_type_info, met_data, gas_record, nprocs, prior_flags=None,
545
- use_trop_eqlat=False, error_handler=_def_errh):
546
+ fo2_file=fo2_prep.DEFAULT_FO2_FILE, use_trop_eqlat=False, error_handler=_def_errh):
546
547
  """
547
548
  Generate the priors, running in parallel mode.
548
549
 
@@ -571,7 +572,8 @@ def _prior_parallel(orig_shape, var_mapping, var_type_info, met_data, gas_record
571
572
  with Pool(processes=nprocs) as pool:
572
573
  result = pool.starmap(_prior_helper, zip(sounding_inds, footprint_inds, qflags, mod_dicts,
573
574
  repeat(gas_record), repeat(var_mapping), repeat(var_type_info),
574
- repeat(use_trop_eqlat), repeat(prior_flags), repeat(error_handler)))
575
+ repeat(use_trop_eqlat), repeat(fo2_file), repeat(prior_flags),
576
+ repeat(error_handler)))
575
577
 
576
578
  # At this point, result will be a list of tuples of pairs of dicts, the first dict the profiles dict, the second
577
579
  # the units dict or None if the prior calculation did not run. We need to combine the profiles into one array per