fre.app.regrid_xy.regrid_xy module
remaps scalar and/or vector fields. It is capable of remapping from a spherical grid onto a different one, e.g. spherical, or tripolar. By default, it does so using a conservative scheme. most valid input args to fregrid are valid in this script
- fre.app.regrid_xy.regrid_xy.check_interp_method(nc_variable, interp_method)
print warning if optional interp_method clashes with nc file attribute field, if present
- fre.app.regrid_xy.regrid_xy.check_per_component_settings(component_list, rose_app_cfg)
for a source file ref’d by multiple components check per-component settings for uniqueness. output list of bools of same length to check in componenet loop
- fre.app.regrid_xy.regrid_xy.freq_to_date_format(iso_freq)
Print legacy Bronx-like date template format given a frequency (ISO 8601 duration)
- fre.app.regrid_xy.regrid_xy.get_grid_dims(grid_spec: str, mosaic_file: str) -> (<class 'int'>, <class 'int'>)
Retrieves the grid sizes from the gridfiles. This method retrieves the grid dimensions via grid_spec –> mosaic_file –> gridfile, where mosaic_file can be either “atm_mosaic_file”, “ocn_mosaic_file”, or “lnd_mosaic_file”. This method assumes that for a multi-tile grid, the grids for each tile are of the same size and will take the first gridfile to retrieve the coordinate dimensions
- fre.app.regrid_xy.regrid_xy.main()
steering, local test/debug
- fre.app.regrid_xy.regrid_xy.make_component_list(config, source)
make list of relevant component names where source file appears in sources
- fre.app.regrid_xy.regrid_xy.make_regrid_var_list(target_file, interp_method=None)
create default list of variables to be regridded within target file.
- fre.app.regrid_xy.regrid_xy.regrid_xy(input_dir, output_dir, begin, tmp_dir, remap_dir, source, grid_spec, rose_config)
calls fre-nctools’ fregrid to regrid netcdf files
- fre.app.regrid_xy.regrid_xy.safe_rose_config_get(config, section, field)
read optional variables from rose configuration, and don’t error on None value
- fre.app.regrid_xy.regrid_xy.test_import()
for quickly testing import within pytest
- fre.app.regrid_xy.regrid_xy.truncate_date(date, freq)
truncates iso freq to iso date time