diff --git a/Changelog.rst b/Changelog.rst index 605b91a..4d0afdd 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -1,3 +1,13 @@ +Version 3.3.8 +------------- + +**2026-??-??** + +* Remove legacy XML files + (https://github.com/NCAS-CMS/cfunits/issues/61) + +---- + Version 3.3.7 ------------- diff --git a/cfunits/etc/udunits/README b/cfunits/etc/udunits/README deleted file mode 100644 index 2f35c16..0000000 --- a/cfunits/etc/udunits/README +++ /dev/null @@ -1,18 +0,0 @@ -UDUNITS version 2.1.24 - -The following units have been removed: - rem - -The following units have been changed: - sievert - sverdrup - -The following units have been added: - practical_salinity_unit - level - sigma_level - layer - decibel - bel - calendar_month - calendar_year diff --git a/cfunits/etc/udunits/udunits2-accepted.xml b/cfunits/etc/udunits/udunits2-accepted.xml deleted file mode 100644 index 8d71c03..0000000 --- a/cfunits/etc/udunits/udunits2-accepted.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - 60 s - minute - min - - - 60 min - hour - h - hr - - - 24 h - day - d - - - - 3.141592653589793238462643383279 - - pi - π - - - - (pi/180) rad - arc_degree - ° - - angular_degree - degree - arcdeg - - - - °/60 - arc_minute - ' - - - angular_minute - arcminute - arcmin - - - - '/60 - arc_second - " - - - angular_second - arcsecond - arcsec - - - - - dm^3 - liter - L - - litre - l - - - - 1000 kg - metric_ton - t - tonne - - - - - 1.60217733e-19 J - electronvolt - eV - - electron_volt - - - - 1.6605402e-27 kg - unified_atomic_mass_unit - u - - atomic_mass_unit - atomicmassunit - amu - - - - 1.495979e11 m - - astronomical_unit - ua - - - - - - 1852 m - - nautical_mile - - - - nautical_mile/hour - - international_knot - knot_international - knot - - - - 1e-10 m - - angstrom - ångström - Å - - - - - dam^2 - - are - a - - - - 100 are - hectare - - - 100 fm^2 - - barn - b - - - - 1000 hPa - - bar - - - - cm/s^2 - - gal - - - - 3.7e10 Bq - - curie - Ci - - - - 2.58e-4 C/kg - - roentgen - R - - - - - - 0.01 sievert - - rem - - - diff --git a/cfunits/etc/udunits/udunits2-accepted.xml.nonCF b/cfunits/etc/udunits/udunits2-accepted.xml.nonCF deleted file mode 100644 index fd11e76..0000000 --- a/cfunits/etc/udunits/udunits2-accepted.xml.nonCF +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - 60 s - minute - min - - - 60 min - hour - h - hr - - - 24 h - day - d - - - - 3.141592653589793238462643383279 - - pi - π - - - - (pi/180) rad - arc_degree - ° - - angular_degree - degree - arcdeg - - - - °/60 - arc_minute - ' - - - angular_minute - arcminute - arcmin - - - - '/60 - arc_second - " - - - angular_second - arcsecond - arcsec - - - - - dm^3 - liter - L - - litre - l - - - - 1000 kg - metric_ton - t - tonne - - - - - 1.60217733e-19 J - electronvolt - eV - - electron_volt - - - - 1.6605402e-27 kg - unified_atomic_mass_unit - u - - atomic_mass_unit - atomicmassunit - amu - - - - 1.495979e11 m - - astronomical_unit - ua - - - - - - 1852 m - - nautical_mile - - - - nautical_mile/hour - - international_knot - knot_international - knot - - - - 1e-10 m - - angstrom - ångström - Å - - - - - dam^2 - - are - a - - - - 100 are - hectare - - - 100 fm^2 - - barn - b - - - - 1000 hPa - - bar - - - - cm/s^2 - - gal - - - - 3.7e10 Bq - - curie - Ci - - - - 2.58e-4 C/kg - - roentgen - R - - - - - cSv - - rem - - - diff --git a/cfunits/etc/udunits/udunits2-base.xml b/cfunits/etc/udunits/udunits2-base.xml deleted file mode 100644 index 4a16ea7..0000000 --- a/cfunits/etc/udunits/udunits2-base.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - meter - m - metre - - - - - kilogram - kg - - - - - second - s - - - - - ampere - A - - - - - kelvin - K - - - - - mole - mol - - - - - candela - cd - - - - - calendar_year - cY - - diff --git a/cfunits/etc/udunits/udunits2-common.xml b/cfunits/etc/udunits/udunits2-common.xml deleted file mode 100644 index 2a10cb7..0000000 --- a/cfunits/etc/udunits/udunits2-common.xml +++ /dev/null @@ -1,1707 +0,0 @@ - - - - - - s - sec - - - A - amp - - - K - - °K - - degree_kelvin - degrees_kelvin - - - degree_K - degrees_K - - - degreeK - degreesK - - - deg_K - degs_K - - - degK - degsK - - - - - cd - candle - - - mole - einstein - - - Hz - - baud - Bd - bps - - - - degree_Celsius - - - celsius - - degree_C - degrees_C - - - degreeC - degreesC - - - deg_C - degs_C - - - degC - degsC - - - - - knot - - kt - kts - - - - - - 6.02214179e23/mol - - avogadro_constant - - - - - 0.01 - - percent - - % - - - - 1e-6 - - ppm - ppmv - - - - 1e-9 - - ppb - ppbv - - - - 1e-12 - - ppt - pptv - - - - 1e-15 - - ppq - ppqv - - - - - - 0.9 arc_degree - grade - - - 2 pi rad - - circle - cycle - turn - revolution - rotation - - - - arc_degree - - - degree_north - degrees_north - - - degree_N - degrees_N - - - degreeN - degreesN - - - degree_east - degrees_east - - - degree_E - degrees_E - - - degreeE - degreesE - - - degree_true - degrees_true - - - degree_T - degrees_T - - - degreeT - degreesT - - - - - -1 degree_east - - - degree_west - degrees_west - - - degree_W - degrees_W - - - degreeW - degreesW - - - - - - - 2.916667e-2 kg - - assay_ton - - - - 2.834952e-2 kg - - avoirdupois_ounce - - - - 4.5359237e-1 kg - - avoirdupois_pound - pound - lb - - - - 2e-4 kg - - carat - - - - 6.479891e-5 kg - - grain - gr - - - - 5.080235e1 kg - - long_hundredweight - - - - 1.555174e-3 kg - - pennyweight - - - - 4.535924e1 kg - - short_hundredweight - - - - 14.59390 kg - - slug - - - - 3.110348e-2 kg - - troy_ounce - apothecary_ounce - - - - 3.732417e-1 kg - - troy_pound - apothecary_pound - - - - 20 grain - scruple - - - 60 grain - apdram - - - 480 grain - apounce - - - 5760 grain - appound - - - 94 pound - bag - - - 2000 pound - - short_ton - ton - - - - 2240 pound - - long_ton - - - - - - 1e-15 m - - fermi - - - - 9.46073e15 m - - light_year - - - - 1e-6 m - - micron - - - - 2.54e-5 m - - mil - - - - 3.085678e16 m - - parsec - - - - 3.514598e-4 m - - printers_point - - - - 2.011684e1 m - - chain - - - - 12 printers_point - - printers_pica - pica - - - - nautical_mile - - nmile - - - - (1200/3937) m - - - US_survey_foot - US_survey_feet - - - - - 3 US_survey_feet - - US_survey_yard - - - - 5280 US_survey_feet - - US_survey_mile - US_statute_mile - - - - 16.5 US_survey_feet - - rod - pole - perch - - - - 660 US_survey_feet - furlong - - - 6 US_survey_feet - fathom - - - 2.54 cm - - international_inch - inch - in - - - - 12 international_inches - - - international_foot - international_feet - - - foot - feet - - ft - - - - 3 international_feet - - international_yard - yard - yd - - - - 5280 international_feet - - international_mile - mile - mi - - - - inch/72 - - big_point - - - - inch/3 - - barleycorn - - - - 191.835 foot - - arpentlin - - - - - - rotation/second - - - rotation_per_second - rotations_per_second - - rps - cps - - - - rotation/minute - rpm - - - - - 1.111111e-7 kg/m - - denier - - - - 1e-6 kg/m - - tex - - - - - - 5.72135e-11 kg/(Pa.s.m^2) - - - perm_0C - perms_0C - - - - - 5.74525e-11 kg/(Pa.s.m^2) - - - perm_23C - perms_23C - - - - - - - 5.067075e-10 m^2 - - circular_mil - - - - 9.869233e-13 m^2 - darcy - - - 160 rod^2 - - acre - - - - - - 1.233489e3 m^3 - - - - acre_foot - acre_feet - - - - - 2.359737e-3 m^3 - - - board_foot - board_feet - - - - - 3.523907e-2 m^3 - - bushel - bu - - - - bushel/4 - - peck - pk - - - - 4.546090e-3 m^3 - - Canadian_liquid_gallon - - - - 4.404884e-3 m^3 - - US_dry_gallon - - - - cm^3 - cc - - - 1 m^3 - - stere - - - - 2.831685 m^3 - - register_ton - - - - US_dry_gallon/4 - - US_dry_quart - dry_quart - - - - US_dry_gallon/8 - - US_dry_pint - dry_pint - - - - 3.785412e-3 m^3 - - US_liquid_gallon - liquid_gallon - gallon - - - - - 42 US_liquid_gallon - - barrel - bbl - - - - - barrel/4 - - firkin - - - - US_liquid_gallon/4 - - US_liquid_quart - liquid_quart - quart - - - - US_liquid_gallon/8 - - US_liquid_pint - liquid_pint - pint - pt - - - - US_liquid_gallon/16 - - US_liquid_cup - liquid_cup - cup - - - - US_liquid_gallon/32 - - US_liquid_gill - liquid_gill - gill - - - - US_liquid_gallon/128 - - US_fluid_ounce - US_liquid_ounce - fluid_ounce - liquid_ounce - oz - floz - - - - US_fluid_ounce/2 - - tablespoon - Tbl - Tbsp - tbsp - Tblsp - tblsp - - - - US_fluid_ounce/8 - fldr - - - US_fluid_ounce/16 - - dram - dr - - - - tablespoon/3 - - teaspoon - tsp - - - - 4.546090e-3 m^3 - - UK_liquid_gallon - - - - UK_liquid_gallon/4 - - UK_liquid_quart - - - - UK_liquid_gallon/8 - - UK_liquid_pint - - - - UK_liquid_gallon/16 - - UK_liquid_cup - - - - UK_liquid_gallon/32 - - UK_liquid_gill - - - - UK_liquid_gallon/160 - - UK_fluid_ounce - UK_liquid_ounce - - - - lg(re (1e-6 m)^3) - BZ - - - - - 1e-8 s - shake - - - 8.616409e4 s - - sidereal_day - - - - 3.590170e3 s - - sidereal_hour - - - - 5.983617e1 s - - sidereal_minute - - - - 0.9972696 s - - sidereal_second - - - - 3.155815e7 s - - sidereal_year - - - - - 3.15569259747e7 s - - tropical_year - year - - yr - - - - 29.530589 day - - lunar_month - - - - 365 day - - common_year - - - - 366 day - - leap_year - - - - 365.25 day - - Julian_year - - - - 365.2425 day - - Gregorian_year - - - - 27.321661 day - - sidereal_month - - - - 27.321582 day - - tropical_month - - - - 14 day - - fortnight - - - - 7 day - week - - - 0.01 s - jiffy - - - 1e9 year - eon - - - year/12 - month - - - - - 1e6 m^3/s - - sverdrup - - Sv - - - - - - 9.806650 m/s^2 - - standard_free_fall - - - - standard_free_fall - gravity - - - - - gravity 1000 kg/m^3 - - conventional_water - water - H2O - h2o - - - - gravity 999.972 kg/m^3 - - - water_4C - waters_4C - - - water_39F - waters_39F - - - - - gravity 999.001 kg/m^3 - - - water_60F - waters_60F - - - - - gravity 13595.10 kg/m^3 - - - mercury_0C - mercuries_0C - - - mercury_32F - mercuries_32F - - - conventional_mercury - conventional_mercuries - - Hg - - - - gravity 13556.8 kg/m^3 - - - mercury_60F - mercuries_60F - - - - - - - standard_free_fall - force - - - 1e-5 N - dyne - - - 9.806650e-3 N - pond - - - 9.806650 N - - force_kilogram - - kilogram_force - kilograms_force - - kgf - - - - 2.780139e-1 N - - force_ounce - - ounce_force - ounces_force - - ozf - - - - 4.4482216152605 N - - force_pound - - pound_force - pounds_force - - lbf - - - - 1.382550e-1 N - - poundal - - - - gram force - - - gram_force - grams_force - - - force_gram - - gf - - - - 2000 force_pound - - force_ton - - ton_force - tons_force - - - - - 1000 lbf - kip - - - - - 1.01325e5 Pa - - standard_atmosphere - atmosphere - atm - - - - 1 kg gravity/cm2 - - technical_atmosphere - at - - - - cm H2O - - cm_H2O - cmH2O - - - - inch water_39F - - - inch_H2O_39F - inches_H2O_39F - - - - - inch water_60F - - - inch_H2O_60F - inches_H2O_60F - - - - - foot water - - - foot_water - feet_water - - - foot_H2O - feet_H2O - - - footH2O - feetH2O - - ftH2O - fth2o - - - - cm Hg - - cm_Hg - cmHg - - - - mm mercury_0C - - - millimeter_Hg_0C - millimeters_Hg_0C - - - - - inch mercury_32F - - - inch_Hg_32F - inches_Hg_32F - - - - - inch mercury_60F - - - inch_Hg_60F - inches_Hg_60F - - - - - mm Hg - - - millimeter_Hg - millimeters_Hg - - torr - mm_Hg - mm_hg - mmHg - mmhg - - - - inch Hg - - - inch_Hg - inches_Hg - - in_Hg - inHg - - - - 1 pound gravity/in^2 - psi - - - kip/in^2 - ksi - - - 0.1 N/m^2 - - barie - barye - - - - lg(re 20e-6 Pa) - B_SPL - - - - - 1e-1 Pa.s - - poise - - - - 1e-4 m^2/s - - stokes - St - - - - 10/(Pa.s) - rhe - - - - - 1e-7 J - erg - - - 1.05505585262e3 J - - - IT_Btu - IT_Btus - - - Btu - Btus - - - - - 1.05506e8 J - - EC_therm - - - - 4.184000 J - - thermochemical_calorie - - - - 4.1868 J - - IT_calorie - calorie - cal - - - - 4.184 MJ/kg - - TNT - - - - 4.184e9 J - - - ton_TNT - tons_TNT - - - - - 1.054804e8 J - - US_therm - therm - thm - - - - watt.hour - - watthour - - - - 1e9 eV - bev - - - - - V.A - - voltampere - VA - - - - 9.80950e3 W - - boiler_horsepower - - - - 7.456999e2 W - - shaft_horsepower - horsepower - hp - - - - 7.35499e2 W - - metric_horsepower - - - - 7.460000e2 W - - electric_horsepower - - - - 7.46043e2 W - - water_horsepower - - - - 7.4570e2 W - - UK_horsepower - - - - 12000 Btu/hr - - refrigeration_ton - - ton_of_refrigeration - tons_of_refrigeration - - - - - lg(re 1 W) - BW - - - lg(re 1 mW) - Bm - - - - - 1.55e-1 K.m^2/W - clo - - - - - 10 A - abampere - - - 7.957747e-1 A - gilbert - - - 3.335640e-10 A - - statampere - - - - 10 A - biot - - - 1e9 F - abfarad - - - 1e-9 H - - abhenry - - - - 1e9 S - abmho - - - 1e-9 ohm - abohm - - - 1e-8 V - abvolt - - - 1.602176487e-19 C - e - - - 9.64957e4 C - - chemical_faraday - - - - 9.65219e4 C - - physical_faraday - - - - 9.648531e4 C - - C12_faraday - faraday - - - - 1e-9 T - - gamma - - - - 1e-4 T - - gauss - - - - 1e-8 Wb - - maxwell - - - - 7.957747e1 A/m - - oersted - Oe - - - - 3.335640e-10 C - - statcoulomb - - - - 1.112650e-12 F - - statfarad - - - - 8.987554e11 H - - stathenry - - - - 1.112650e-12 S - - statmho - - - - 8.987554e11 ohm - - statohm - - - - 2.997925e2 V - - statvolt - - - - 1.256637e-7 Wb - - unit_pole - - - - lg(re 1 V) - BV - - - lg(re 0.775 V) - Bv - - - lg(re 1e-6 V) - BµV - - - - - - K/1.8 - - °R - - degree_rankine - degrees_rankine - - - degreeR - degreesR - - - degree_R - degrees_R - - - degR - degsR - - - deg_R - degs_R - - - - - °R @ 459.67 - - °F - - fahrenheit - - degree_fahrenheit - degrees_fahrenheit - - - degreeF - degreesF - - - degree_F - degrees_F - - - degF - degsF - - - deg_F - degs_F - - - - - - - 1.076391e-1 lx - - footcandle - - - - 3.426259 cd/m^2 - - footlambert - - - - (1e4/pi) cd/m^2 - - lambert - - - - 1e4 cd/m^2 - - stilb - sb - - - - 1e4 lm/m^2 - - phot - ph - - - - 1 cd/m^2 - - nit - nt - - - - 4.184000e4 J/m^2 - - langley - - - - cd/(pi m^2) - - blondel - apostilb - - - - - - 100/m - kayser - - - gravity - - geopotential - dynamic - gp - - - - 2056 hours - - work_year - - - - work_year/12 - - work_month - - - - 1e-6 m^2 s^-1 K kg^-1 - - potential_vorticity_unit - PVU - - - - 1 - - count - - - - 446.2 micromoles/meter^2 - - dobson - DU - - - - - 1e-3 - - - practical_salinity_unit - practical_salinity_units - - psu - - - - calendar_year/12 - - - calendar_month - - cM - - - - 1 - - - level - levels - - - - - 1 - - - layer - layers - - - - - 1 - - - sigma_level - sigma_levels - - - - - 1 - - - decibel - decibels - - dB - - - - 10 dB - - - bel - bels - - - - - diff --git a/cfunits/etc/udunits/udunits2-common.xml.nonCF b/cfunits/etc/udunits/udunits2-common.xml.nonCF deleted file mode 100644 index 07a69a9..0000000 --- a/cfunits/etc/udunits/udunits2-common.xml.nonCF +++ /dev/null @@ -1,1640 +0,0 @@ - - - - - - s - sec - - - A - amp - - - K - - °K - - degree_kelvin - degrees_kelvin - - - degree_K - degrees_K - - - degreeK - degreesK - - - deg_K - degs_K - - - degK - degsK - - - - - cd - candle - - - mole - einstein - - - Hz - - baud - Bd - bps - - - - degree_Celsius - - - celsius - - degree_C - degrees_C - - - degreeC - degreesC - - - deg_C - degs_C - - - degC - degsC - - - - - knot - - kt - kts - - - - - - 6.02214179e23/mol - - avogadro_constant - - - - - 0.01 - - percent - - % - - - - 1e-6 - - ppm - ppmv - - - - 1e-9 - - ppb - ppbv - - - - 1e-12 - - ppt - pptv - - - - 1e-15 - - ppq - ppqv - - - - - - 0.9 arc_degree - grade - - - 2 pi rad - - circle - cycle - turn - revolution - rotation - - - - arc_degree - - - degree_north - degrees_north - - - degree_N - degrees_N - - - degreeN - degreesN - - - degree_east - degrees_east - - - degree_E - degrees_E - - - degreeE - degreesE - - - degree_true - degrees_true - - - degree_T - degrees_T - - - degreeT - degreesT - - - - - -1 degree_east - - - degree_west - degrees_west - - - degree_W - degrees_W - - - degreeW - degreesW - - - - - - - 2.916667e-2 kg - - assay_ton - - - - 2.834952e-2 kg - - avoirdupois_ounce - - - - 4.5359237e-1 kg - - avoirdupois_pound - pound - lb - - - - 2e-4 kg - - carat - - - - 6.479891e-5 kg - - grain - gr - - - - 5.080235e1 kg - - long_hundredweight - - - - 1.555174e-3 kg - - pennyweight - - - - 4.535924e1 kg - - short_hundredweight - - - - 14.59390 kg - - slug - - - - 3.110348e-2 kg - - troy_ounce - apothecary_ounce - - - - 3.732417e-1 kg - - troy_pound - apothecary_pound - - - - 20 grain - scruple - - - 60 grain - apdram - - - 480 grain - apounce - - - 5760 grain - appound - - - 94 pound - bag - - - 2000 pound - - short_ton - ton - - - - 2240 pound - - long_ton - - - - - - 1e-15 m - - fermi - - - - 9.46073e15 m - - light_year - - - - 1e-6 m - - micron - - - - 2.54e-5 m - - mil - - - - 3.085678e16 m - - parsec - - - - 3.514598e-4 m - - printers_point - - - - 2.011684e1 m - - chain - - - - 12 printers_point - - printers_pica - pica - - - - nautical_mile - - nmile - - - - (1200/3937) m - - - US_survey_foot - US_survey_feet - - - - - 3 US_survey_feet - - US_survey_yard - - - - 5280 US_survey_feet - - US_survey_mile - US_statute_mile - - - - 16.5 US_survey_feet - - rod - pole - perch - - - - 660 US_survey_feet - furlong - - - 6 US_survey_feet - fathom - - - 2.54 cm - - international_inch - inch - in - - - - 12 international_inches - - - international_foot - international_feet - - - foot - feet - - ft - - - - 3 international_feet - - international_yard - yard - yd - - - - 5280 international_feet - - international_mile - mile - mi - - - - inch/72 - - big_point - - - - inch/3 - - barleycorn - - - - 191.835 foot - - arpentlin - - - - - - rotation/second - - - rotation_per_second - rotations_per_second - - rps - cps - - - - rotation/minute - rpm - - - - - 1.111111e-7 kg/m - - denier - - - - 1e-6 kg/m - - tex - - - - - - 5.72135e-11 kg/(Pa.s.m^2) - - - perm_0C - perms_0C - - - - - 5.74525e-11 kg/(Pa.s.m^2) - - - perm_23C - perms_23C - - - - - - - 5.067075e-10 m^2 - - circular_mil - - - - 9.869233e-13 m^2 - darcy - - - 160 rod^2 - - acre - - - - - - 1.233489e3 m^3 - - - - acre_foot - acre_feet - - - - - 2.359737e-3 m^3 - - - board_foot - board_feet - - - - - 3.523907e-2 m^3 - - bushel - bu - - - - bushel/4 - - peck - pk - - - - 4.546090e-3 m^3 - - Canadian_liquid_gallon - - - - 4.404884e-3 m^3 - - US_dry_gallon - - - - cm^3 - cc - - - 1 m^3 - - stere - - - - 2.831685 m^3 - - register_ton - - - - US_dry_gallon/4 - - US_dry_quart - dry_quart - - - - US_dry_gallon/8 - - US_dry_pint - dry_pint - - - - 3.785412e-3 m^3 - - US_liquid_gallon - liquid_gallon - gallon - - - - - 42 US_liquid_gallon - - barrel - bbl - - - - - barrel/4 - - firkin - - - - US_liquid_gallon/4 - - US_liquid_quart - liquid_quart - quart - - - - US_liquid_gallon/8 - - US_liquid_pint - liquid_pint - pint - pt - - - - US_liquid_gallon/16 - - US_liquid_cup - liquid_cup - cup - - - - US_liquid_gallon/32 - - US_liquid_gill - liquid_gill - gill - - - - US_liquid_gallon/128 - - US_fluid_ounce - US_liquid_ounce - fluid_ounce - liquid_ounce - oz - floz - - - - US_fluid_ounce/2 - - tablespoon - Tbl - Tbsp - tbsp - Tblsp - tblsp - - - - US_fluid_ounce/8 - fldr - - - US_fluid_ounce/16 - - dram - dr - - - - tablespoon/3 - - teaspoon - tsp - - - - 4.546090e-3 m^3 - - UK_liquid_gallon - - - - UK_liquid_gallon/4 - - UK_liquid_quart - - - - UK_liquid_gallon/8 - - UK_liquid_pint - - - - UK_liquid_gallon/16 - - UK_liquid_cup - - - - UK_liquid_gallon/32 - - UK_liquid_gill - - - - UK_liquid_gallon/160 - - UK_fluid_ounce - UK_liquid_ounce - - - - lg(re (1e-6 m)^3) - BZ - - - - - 1e-8 s - shake - - - 8.616409e4 s - - sidereal_day - - - - 3.590170e3 s - - sidereal_hour - - - - 5.983617e1 s - - sidereal_minute - - - - 0.9972696 s - - sidereal_second - - - - 3.155815e7 s - - sidereal_year - - - - - 3.15569259747e7 s - - tropical_year - year - - yr - - - - 29.530589 day - - lunar_month - - - - 365 day - - common_year - - - - 366 day - - leap_year - - - - 365.25 day - - Julian_year - - - - 365.2425 day - - Gregorian_year - - - - 27.321661 day - - sidereal_month - - - - 27.321582 day - - tropical_month - - - - 14 day - - fortnight - - - - 7 day - week - - - 0.01 s - jiffy - - - 1e9 year - eon - - - year/12 - month - - - - - 1e6 m^3/s - - sverdrup - - - - - - - 9.806650 m/s^2 - - standard_free_fall - - - - standard_free_fall - gravity - - - - - gravity 1000 kg/m^3 - - conventional_water - water - H2O - h2o - - - - gravity 999.972 kg/m^3 - - - water_4C - waters_4C - - - water_39F - waters_39F - - - - - gravity 999.001 kg/m^3 - - - water_60F - waters_60F - - - - - gravity 13595.10 kg/m^3 - - - mercury_0C - mercuries_0C - - - mercury_32F - mercuries_32F - - - conventional_mercury - conventional_mercuries - - Hg - - - - gravity 13556.8 kg/m^3 - - - mercury_60F - mercuries_60F - - - - - - - standard_free_fall - force - - - 1e-5 N - dyne - - - 9.806650e-3 N - pond - - - 9.806650 N - - force_kilogram - - kilogram_force - kilograms_force - - kgf - - - - 2.780139e-1 N - - force_ounce - - ounce_force - ounces_force - - ozf - - - - 4.4482216152605 N - - force_pound - - pound_force - pounds_force - - lbf - - - - 1.382550e-1 N - - poundal - - - - gram force - - - gram_force - grams_force - - - force_gram - - gf - - - - 2000 force_pound - - force_ton - - ton_force - tons_force - - - - - 1000 lbf - kip - - - - - 1.01325e5 Pa - - standard_atmosphere - atmosphere - atm - - - - 1 kg gravity/cm2 - - technical_atmosphere - at - - - - cm H2O - - cm_H2O - cmH2O - - - - inch water_39F - - - inch_H2O_39F - inches_H2O_39F - - - - - inch water_60F - - - inch_H2O_60F - inches_H2O_60F - - - - - foot water - - - foot_water - feet_water - - - foot_H2O - feet_H2O - - - footH2O - feetH2O - - ftH2O - fth2o - - - - cm Hg - - cm_Hg - cmHg - - - - mm mercury_0C - - - millimeter_Hg_0C - millimeters_Hg_0C - - - - - inch mercury_32F - - - inch_Hg_32F - inches_Hg_32F - - - - - inch mercury_60F - - - inch_Hg_60F - inches_Hg_60F - - - - - mm Hg - - - millimeter_Hg - millimeters_Hg - - torr - mm_Hg - mm_hg - mmHg - mmhg - - - - inch Hg - - - inch_Hg - inches_Hg - - in_Hg - inHg - - - - 1 pound gravity/in^2 - psi - - - kip/in^2 - ksi - - - 0.1 N/m^2 - - barie - barye - - - - lg(re 20e-6 Pa) - B_SPL - - - - - 1e-1 Pa.s - - poise - - - - 1e-4 m^2/s - - stokes - St - - - - 10/(Pa.s) - rhe - - - - - 1e-7 J - erg - - - 1.05505585262e3 J - - - IT_Btu - IT_Btus - - - Btu - Btus - - - - - 1.05506e8 J - - EC_therm - - - - 4.184000 J - - thermochemical_calorie - - - - 4.1868 J - - IT_calorie - calorie - cal - - - - 4.184 MJ/kg - - TNT - - - - 4.184e9 J - - - ton_TNT - tons_TNT - - - - - 1.054804e8 J - - US_therm - therm - thm - - - - watt.hour - - watthour - - - - 1e9 eV - bev - - - - - V.A - - voltampere - VA - - - - 9.80950e3 W - - boiler_horsepower - - - - 7.456999e2 W - - shaft_horsepower - horsepower - hp - - - - 7.35499e2 W - - metric_horsepower - - - - 7.460000e2 W - - electric_horsepower - - - - 7.46043e2 W - - water_horsepower - - - - 7.4570e2 W - - UK_horsepower - - - - 12000 Btu/hr - - refrigeration_ton - - ton_of_refrigeration - tons_of_refrigeration - - - - - lg(re 1 W) - BW - - - lg(re 1 mW) - Bm - - - - - 1.55e-1 K.m^2/W - clo - - - - - 10 A - abampere - - - 7.957747e-1 A - gilbert - - - 3.335640e-10 A - - statampere - - - - 10 A - biot - - - 1e9 F - abfarad - - - 1e-9 H - - abhenry - - - - 1e9 S - abmho - - - 1e-9 ohm - abohm - - - 1e-8 V - abvolt - - - 1.602176487e-19 C - e - - - 9.64957e4 C - - chemical_faraday - - - - 9.65219e4 C - - physical_faraday - - - - 9.648531e4 C - - C12_faraday - faraday - - - - 1e-9 T - - gamma - - - - 1e-4 T - - gauss - - - - 1e-8 Wb - - maxwell - - - - 7.957747e1 A/m - - oersted - Oe - - - - 3.335640e-10 C - - statcoulomb - - - - 1.112650e-12 F - - statfarad - - - - 8.987554e11 H - - stathenry - - - - 1.112650e-12 S - - statmho - - - - 8.987554e11 ohm - - statohm - - - - 2.997925e2 V - - statvolt - - - - 1.256637e-7 Wb - - unit_pole - - - - lg(re 1 V) - BV - - - lg(re 0.775 V) - Bv - - - lg(re 1e-6 V) - BµV - - - - - - K/1.8 - - °R - - degree_rankine - degrees_rankine - - - degreeR - degreesR - - - degree_R - degrees_R - - - degR - degsR - - - deg_R - degs_R - - - - - °R @ 459.67 - - °F - - fahrenheit - - degree_fahrenheit - degrees_fahrenheit - - - degreeF - degreesF - - - degree_F - degrees_F - - - degF - degsF - - - deg_F - degs_F - - - - - - - 1.076391e-1 lx - - footcandle - - - - 3.426259 cd/m^2 - - footlambert - - - - (1e4/pi) cd/m^2 - - lambert - - - - 1e4 cd/m^2 - - stilb - sb - - - - 1e4 lm/m^2 - - phot - ph - - - - 1 cd/m^2 - - nit - nt - - - - 4.184000e4 J/m^2 - - langley - - - - cd/(pi m^2) - - blondel - apostilb - - - - - - 100/m - kayser - - - gravity - - geopotential - dynamic - gp - - - - 2056 hours - - work_year - - - - work_year/12 - - work_month - - - - 1e-6 m^2 s^-1 K kg^-1 - - potential_vorticity_unit - PVU - - - - 1 - - count - - - - 446.2 micromoles/meter^2 - - dobson - DU - - - diff --git a/cfunits/etc/udunits/udunits2-derived.xml b/cfunits/etc/udunits/udunits2-derived.xml deleted file mode 100644 index d01250a..0000000 --- a/cfunits/etc/udunits/udunits2-derived.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - radian - rad - - - rad^2 - steradian - sr - - - 1/s - hertz - Hz - - - 1e-3 kg - gram - g - - - m.kg/s^2 - newton - N - - - N/m^2 - pascal - Pa - - - N.m - joule - J - - - J/s - watt - W - - - s.A - coulomb - C - - - W/A - volt - V - - - C/V - farad - F - - - V/A - ohm - Ω - - - - - - A/V - siemens - S - - - V.s - weber - Wb - - - Wb/m^2 - tesla - T - - - Wb/A - henry - H - - - K @ 273.15 - - degree_Celsius - degrees_Celsius - - °C - - - cd.sr - lumen - lm - - - lm/m^2 - lux - lx - - - mol/s - katal - kat - - - - - 1/s - - - becquerel - Bq - - - - J/kg - gray - Gy - - - J/kg - - sievert - - - - diff --git a/cfunits/etc/udunits/udunits2-derived.xml.nonCF b/cfunits/etc/udunits/udunits2-derived.xml.nonCF deleted file mode 100644 index 72432bd..0000000 --- a/cfunits/etc/udunits/udunits2-derived.xml.nonCF +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - radian - rad - - - rad^2 - steradian - sr - - - 1/s - hertz - Hz - - - 1e-3 kg - gram - g - - - m.kg/s^2 - newton - N - - - N/m^2 - pascal - Pa - - - N.m - joule - J - - - J/s - watt - W - - - s.A - coulomb - C - - - W/A - volt - V - - - C/V - farad - F - - - V/A - ohm - Ω - - - - - - A/V - siemens - S - - - V.s - weber - Wb - - - Wb/m^2 - tesla - T - - - Wb/A - henry - H - - - K @ 273.15 - - degree_Celsius - degrees_Celsius - - °C - - - cd.sr - lumen - lm - - - lm/m^2 - lux - lx - - - mol/s - katal - kat - - - - - 1/s - - - becquerel - Bq - - - - J/kg - gray - Gy - - - J/kg - - sievert - Sv - - - diff --git a/cfunits/etc/udunits/udunits2-prefixes.xml b/cfunits/etc/udunits/udunits2-prefixes.xml deleted file mode 100644 index 686b3e5..0000000 --- a/cfunits/etc/udunits/udunits2-prefixes.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - 1e24 yotta Y - - - 1e21 zetta Z - - - 1e18 exa E - - - 1e15 peta P - - - 1e12 tera T - - - 1e9 giga G - - - 1e6 mega M - - - 1e3 kilo k - - - 100 hecto h - - - 10 deka da - - - .1 deci d - - - .01 centi c - - - 1e-3 milli m - - - 1e-6 - micro - µ - μ - u - - - 1e-9 nano n - - - 1e-12 pico p - - - 1e-15 femto f - - - 1e-18 atto a - - - 1e-21 zepto z - - - 1e-24 yocto y - - diff --git a/cfunits/etc/udunits/udunits2.xml b/cfunits/etc/udunits/udunits2.xml deleted file mode 100644 index 729828f..0000000 --- a/cfunits/etc/udunits/udunits2.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - udunits2-prefixes.xml - udunits2-base.xml - udunits2-derived.xml - udunits2-accepted.xml - udunits2-common.xml - diff --git a/cfunits/test/test_Units.py b/cfunits/test/test_Units.py index cc3d005..311b532 100644 --- a/cfunits/test/test_Units.py +++ b/cfunits/test/test_Units.py @@ -3,7 +3,7 @@ import os import unittest -import numpy +import numpy as np from dask.base import tokenize faulthandler.enable() # to debug seg faults and timeouts @@ -149,77 +149,78 @@ def test_Units_conform(self): ) x = Units.conform([360], Units("second"), Units("minute")) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, 6)) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, 6)) x = Units.conform((360, 720), Units("second"), Units("minute")) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, [6, 12])) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, [6, 12])) x = Units.conform([360.0, 720.0], Units("second"), Units("minute")) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, [6, 12])) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, [6, 12])) x = Units.conform([[360, 720]], Units("second"), Units("minute")) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, [[6, 12]])) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, [[6, 12]])) - v = numpy.array([360.0, 720.0], dtype=numpy.dtype("float64")) + v = np.array([360.0, 720.0], dtype=np.dtype("float64")) x = Units.conform(v, Units("second"), Units("minute")) - self.assertIsInstance(x, numpy.ndarray) - self.assertEqual(x.dtype, numpy.dtype("float64")) - self.assertTrue(numpy.allclose(x, [6, 12]), x) + self.assertIsInstance(x, np.ndarray) + self.assertEqual(x.dtype, np.dtype("float64")) + self.assertTrue(np.allclose(x, [6, 12]), x) - v = numpy.array([360, 720], dtype=numpy.dtype("int64")) + v = np.array([360, 720], dtype=np.dtype("int64")) x = Units.conform(v, Units("second"), Units("minute"), inplace=True) - self.assertIsInstance(x, numpy.ndarray) - self.assertEqual(x.dtype, numpy.dtype("float64")) - self.assertTrue(numpy.allclose(x, [6, 12])) - self.assertTrue(numpy.allclose(x, v)) + self.assertIsInstance(x, np.ndarray) + self.assertEqual(x.dtype, np.dtype("float64")) + self.assertTrue(np.allclose(x, [6, 12])) + self.assertTrue(np.allclose(x, v)) - v = numpy.array([360, 720], dtype=numpy.dtype("int32")) + v = np.array([360, 720], dtype=np.dtype("int32")) x = Units.conform(v, Units("second"), Units("minute"), inplace=True) - self.assertIsInstance(x, numpy.ndarray) - self.assertEqual(x.dtype, numpy.dtype("float32")) - self.assertTrue(numpy.allclose(x, [6, 12])) - self.assertTrue(numpy.allclose(x, v)) + self.assertIsInstance(x, np.ndarray) + self.assertEqual(x.dtype, np.dtype("float32")) + self.assertTrue(np.allclose(x, [6, 12])) + self.assertTrue(np.allclose(x, v)) - for i in range(24): - v = numpy.array([], dtype=numpy.sctypeDict[i]) + for t in np.sctypeDict: + v = np.array([], dtype=t) if v.dtype.kind == "i": - v = numpy.array([60, 120], dtype=numpy.sctypeDict[i]) + v = np.array([60, 120], dtype=t) check_dtype = v.dtype.str x = Units.conform( v, Units("second"), Units("minute"), inplace=True ) - self.assertIsInstance(x, numpy.ndarray) + self.assertIsInstance(x, np.ndarray) if check_dtype[-1] in ["1", "2"]: # no inplace converting possible self.assertEqual(x.dtype.itemsize, 4) else: self.assertEqual(x.dtype.str, v.dtype.str) - self.assertTrue(numpy.allclose(x, v)) - self.assertTrue(numpy.allclose(x, [1, 2])) + self.assertTrue(np.allclose(x, v)) + + self.assertTrue(np.allclose(x, [1, 2])) x = Units.conform(35, Units("degrees_C"), Units("degrees_F")) self.assertIsInstance(x, float) - self.assertTrue(numpy.allclose(x, 95)) + self.assertTrue(np.allclose(x, 95)) x = Units.conform([35], Units("degrees_C"), Units("degrees_F")) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, 95)) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, 95)) x = Units.conform( 35, Units("degrees_C"), Units("degrees_F"), inplace=True ) self.assertIsInstance(x, float) - self.assertTrue(numpy.allclose(x, 95)) + self.assertTrue(np.allclose(x, 95)) x = Units.conform( [35], Units("degrees_C"), Units("degrees_F"), inplace=True ) - self.assertIsInstance(x, numpy.ndarray) - self.assertTrue(numpy.allclose(x, 95)) + self.assertIsInstance(x, np.ndarray) + self.assertTrue(np.allclose(x, 95)) with self.assertRaises(ValueError): Units.conform(1, Units("m"), Units("second"))