Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STASH to CF mapping: Use of aliases #2724

Closed
tv3141 opened this issue Aug 3, 2017 · 4 comments
Closed

STASH to CF mapping: Use of aliases #2724

tv3141 opened this issue Aug 3, 2017 · 4 comments
Labels

Comments

@tv3141
Copy link
Contributor

tv3141 commented Aug 3, 2017

The names below are aliases for CF standard names being used in the STASH to CF mapping. To avoid ambiguity I suggest to avoid aliases.

!wget http://cfconventions.org/Data/cf-standard-names/55/build/cf-standard-name-table.html
!wget https://raw.githubusercontent.com/SciTools/iris/master/lib/iris/fileformats/um_cf_map.py
import um_cf_map

cf_file = 'cf-standard-name-table.html'

aliases = {}  # alias -> name
with open(cf_file) as f:
    lines = list(f)
    for i, line in enumerate(lines):
        if 'alias' in line:
            alias = line[14:-7]
            
            # go back to line with proper name
            while not 'name' in lines[i]:
                i -= 1
            name = lines[i][9:90].split('"')[0]
            
            aliases[alias] = name

iris_cf_names = [val.standard_name for val in um_cf_map.STASH_TO_CF.values()]
aliases_in_um_cf_map = set(aliases.keys()).intersection(set(iris_cf_names))
for alias in aliases_in_um_cf_map:
    print('{}\n    -> {}'.format(alias, aliases[alias]))
air_pressure_at_sea_level
    -> air_pressure_at_mean_sea_level
atmosphere_cloud_liquid_water_content
    -> atmosphere_mass_content_of_cloud_liquid_water
large_scale_snowfall_flux
    -> stratiform_snowfall_flux
soil_moisture_content
    -> mass_content_of_water_in_soil
mass_concentration_of_dust_dry_aerosol_in_air
    -> mass_concentration_of_dust_dry_aerosol_particles_in_air
atmosphere_cloud_ice_content
    -> atmosphere_mass_content_of_cloud_ice
gross_primary_productivity_of_carbon
    -> gross_primary_productivity_of_biomass_expressed_as_carbon
soil_respiration_carbon_flux
    -> surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_respiration
tendency_of_mass_fraction_of_stratiform_cloud_ice_in_air_due_to_riming_from_cloud_liquid
    -> tendency_of_mass_fraction_of_stratiform_cloud_ice_in_air_due_to_riming_from_cloud
net_primary_productivity_of_carbon
    -> net_primary_productivity_of_biomass_expressed_as_carbon
plant_respiration_carbon_flux
    -> surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_plant_respi
atmosphere_optical_thickness_due_to_seasalt_ambient_aerosol
    -> atmosphere_optical_thickness_due_to_sea_salt_ambient_aerosol_particles
surface_carbon_dioxide_mole_flux
    -> surface_upward_mole_flux_of_carbon_dioxide
large_scale_rainfall_flux
    -> stratiform_rainfall_flux
moisture_content_of_soil_layer
    -> mass_content_of_water_in_soil_layer
tendency_of_mass_fraction_of_stratiform_cloud_ice_in_air_due_to_heterogeneous_nucleation_from_cloud_liquid
    -> tendency_of_mass_fraction_of_stratiform_cloud_ice_in_air_due_to_heterogeneous_nuc
atmosphere_optical_thickness_due_to_dust_ambient_aerosol
    -> atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles
surface_snow_and_ice_sublimation_flux
    -> tendency_of_surface_snow_and_ice_amount_due_to_sublimation
soil_carbon_content
    -> soil_mass_content_of_carbon
@pelson
Copy link
Member

pelson commented Jan 3, 2018

Thanks @tv3141. I agree. There is some complexity here as we source our data from metaRelate. (see comment at https://github.com/SciTools/iris/blob/master/lib/iris/fileformats/um_cf_map.py#L18-L23).

Long term we need to make a decision as to whether having that data outside of the Iris codebase is healthy. I fear we aren't going to be able to make that decision quickly though - there are pros/cons on both sides.

@tv3141
Copy link
Contributor Author

tv3141 commented Jun 27, 2018

@marqh I saw you fixed #2725 in #3043. Is there any chance you can fix this issue too?
I updated the issue description to show the proper standard name for each alias that is being used.

@github-actions
Copy link
Contributor

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

@github-actions github-actions bot added the Stale A stale issue/pull-request label Aug 10, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2021

This stale issue has been automatically closed due to a lack of community activity.

If you still care about this issue, then please either:

  • Re-open this issue, if you have sufficient permissions, or
  • Add a comment pinging @SciTools/iris-devs who will re-open on your behalf.

@github-actions github-actions bot closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants