Skip to content

Releases: TCCON/py-ginput

ginput v1.6.2 release

09 Feb 23:26

Choose a tag to compare

After the 1.6.1 release, we found that pytz is not automatically installed as a dependency with pip or conda/mamba. This is most likely due to it being dropped as a dependency of the other direct dependencies. The 1.6.2 release adds pytz and cftime as explicit dependencies. It also pins pandas to <3.0.0, since we have not done any testing with the latest major versions of pandas and cannot say if ginput is compatible with them.

ginput v1.6.1 release

07 Feb 19:51

Choose a tag to compare

This release fixes a bug that causes non-editable installs to fail due to a missing __init__.py file in ginput/tools. It also ensures that numpy 1.y.z is installed when using the Python 3.12 environment file.

ginput v1.6.0 release

05 Feb 22:29

Choose a tag to compare

ginput 1.6.0

This release includes the following changes:

The default method for interpolating & extrapolating NOAA data changed.

Previously, the MLO and SMO timeseries were averaged together first (dropping
any months where one site was missing data), then any missing months within
the timeseries were filled in by simple time-linear interpolation and any
necessary extrapolation at the beginning and end was done with a combination
of a fit to the secular trend and imposition of an average seasonal cycle.

This, however, performs poorly when either site has a large gap - the linear
interpolation means that a gap of more than a few months will fail to capture
a seasonal cycle, biasing the overall trend high or low depending on where the
gap starts and ends in the cycle. 1.6.0 introduces a new approach by default,
where MLO and SMO are filled in and extended separately and use the trend +
seasonal cycle logic to interpolate all gaps.

Because the sites are now gap filled and extended separately, this will result
in changes even when using MLO and SMO data that do not have gaps. All of the
command line interface calls use this new method. For simplicity, there is
no way to revert to the old method from the command line. However, the
MloSmoTraceGasRecord and its child classes do have a new keyword
(use_pre1p6_interpolation) that can be set to True to switch them back
to the old interpolation/extrapolation method. Likewise, the acos_interface_main
function in the priors.acos_interface module has a pre_1p6_interp keyword
that, when set to True, reverts to the old method. If you truly need to
use version 1.6+ but retain the old method, please write custom wrapper code
to call the necessary routines with the custom gas records or options for
acos_interface_main.

Improved CLI access

Ginput traditionally creates a run_ginput.py script when installed manually.
We have now added a console script entry point so that, when installed with
pip, the ginput_cli script will be added to your current environment as
well. This simplifies the install process.

The main() function is also now found in ginput.__main__ and can accept
a list of command line arguments. This means that you can mimic CLI calls
from within Python more easily.

Prototype netCDF tool

This version adds a prototype subcommand (tar2nc) that converts standard
site tarballs of .mod and .vmr files to a single netCDF file. It is
still being developed, and may not work for all versions of .mod and
.vmr files.

ginput v1.5.1 release

16 Oct 05:31

Choose a tag to compare

This release aims to fix cases where the git or hg commands are not available, causing the writers for some files to fail.

ginput v1.5.0 release

16 Oct 03:56

Choose a tag to compare

This release includes several disparate updates:

  • Updated usage of pandas and scipy to remove calls to deprecated functions
    or using deprecated keywords/time interval formats. This also allows ginput
    to work under Python 3.12. (Credit: @rocheseb)
    • Because this raised the minimum versions of a few dependencies, we have
      incremented the minor version number to indicate that users may need to
      rebuild their environments.
  • The test cases now use pytest instead of the built-in unit testing framework.
    • The tests have now been reorganized to reside in the top level of the repo;
      the ginput/testing subdirectory is deprecated. It will be full removed once
      the last utility commands are migrated.
    • This was done to make it easier to run tests while creating a conda-forge
      package.

ginput v1.4.4 release

30 Sep 21:57

Choose a tag to compare

This release updates fo2_prep to handle a change to the Scripps O2/N2 file format.

ginput v1.4.3 release

08 Sep 17:40

Choose a tag to compare

This release just fixes the allowed scipy version, otherwise it is identical to 1.4.2.

ginput v1.4.2 release

08 Sep 17:01

Choose a tag to compare

This release addresses two issues.

First, it now errors by default if input in situ data includes negative values, assuming that these are fill values which should have been replaced by NaNs.

Second, it fixes a bug in error handling in the satellite priors code. Previously, ginput would crash if a sounding resulted in an error that did not have a string as its first argument; it will now properly convert that argument to a string.

ginput v1.4.1 release

05 Jun 16:36

Choose a tag to compare

This release fixes a bug when creating satellite prior files with a specific
O2 dry mole fraction file as input and adds more flexibility to the creation
of the O2 dry air mole fraction files:

  • When passing an O2 file to the oco or acos subcommands with the --fo2-file
    option, it is now correctly passed down into the functions that calculate the
    priors. Because these function instantiate an instance of the O2 record class,
    ginput would crash if you specified --fo2-file without having the default
    O2 file in the ginput data directory. This is now fixed.
  • The update_fo2 subcommand now accepts a --dest-file argument to specify where
    to write the new/updated O2 file, rather than assuming that it should overwrite
    the existing O2 file.
  • The update_fo2 subcommand now has a --no-download flag to disable automatic
    download of the NOAA and Scripps input files required for the O2 DMF calculation.
    In that case, the location of these files can be specified through the --download-dir
    option, which can accept either a path to a directory containing the files
    (which must have the expected names) or a JSON file specifying where to find
    each of the 4 required files.
  • The update_fo2 subcommand now has a --extrap-to-year option, which will
    cause the output f(O2) file to be extrapolated to the given year. This allows
    less dependence on the upstream data files being kept up-to-date.

Other changes:

  • A new one time script is included to pad NOAA hourly data with fill values to the
    end of the current year, in case the available hourly files stop early.
  • NOAA data through 2024 is included in the repo for future-proofing.

ginput v1.4.0 release

08 May 22:29

Choose a tag to compare

This release adds mean O2 dry air mole fractions into the satellite .h5 files. There will be one value per sounding in the "o2_record/o2_global_dmf" variable and a granule mean in the "o2_record/granule_mean_o2_global_dmf" variable. Note that the latter is a scalar; if reading with the h5py Python package, you will need to slice it with an empty tuple rather than a colon to get the value. This change means that running the satellite priors module requires that the input data for the O2 DMF calculation be available or it be allowed to automatically download and prepare those inputs. Because this is a change to the command line API, we have incremented the minor version number.

The update_fo2 subcommand also now has more options to control where the various data files are written, if needed.

Additionally, the time needed to calculate the stratospheric lookup tables for N2O and CH4 has been reduced by a factor of 3, with no change to the output values. This was accomplished by minimizing duplicate calculations in the inner-most loop for those LUTs.