Re: [CF Metadata] #153: Requirements related to specific standard names

2016-11-03 Thread CF Metadata
#153: Requirements related to specific standard names
-+--
  Reporter:  martin.juckes   |  Owner:  cf-conventions@…
  Type:  enhancement | Status:  new
  Priority:  medium  |  Milestone:
 Component:  cf-conventions  |Version:
Resolution:  |   Keywords:
-+--

Comment (by martin.juckes):

 Dear Jonathan,

 I'm happy with that proposal .. perhaps with one extra line in the
 conventions document to say that "Use of some standard names introduces
 additional constraints on the variable attributes and/or values, as
 detailed in `link to: Requirements Related to Specific Standard Names` . "

 I also agree on the need for a machine readable form. I was thinking that
 something would be needed to assist the proof reading. E.g. a JSON file
 which can be used to generate a spreadsheet displaying the definitions of
 all the variables listed under each constraint.

 I think the more legible wiki form is also necessary, in order to provide
 the usage examples. In the earlier email discusion, Roy Lowry suggested
 encoding the rules in RDF and serving them through the NERC Vocab Server
 alongside the standard names. This would be neat, but I think it may be
 worth generating wiki and JSON versions first, in order to get a clearer
 view of the range of constraints that we are dealing with,

 regards,
 Martin

--
Ticket URL: 
CF Metadata 
CF Metadata


Re: [CF Metadata] #153: Requirements related to specific standard names (was: Requires related to specific standard names)

2016-11-03 Thread CF Metadata
#153: Requirements related to specific standard names
-+--
  Reporter:  martin.juckes   |  Owner:  cf-conventions@…
  Type:  enhancement | Status:  new
  Priority:  medium  |  Milestone:
 Component:  cf-conventions  |Version:
Resolution:  |   Keywords:
-+--
Description changed by martin.juckes:

Old description:

> A significant number of standard names contain, in their definitions,
> explicit specifications for additional required metadata. For instance,
> if the standard_name is "region" then there are constraints on the
> allowed values of the data variable. The standard name descriptions
> cannot include examples or markup, and the specification of the rules is
> not as clear as in the convention text. It also appears that the rules
> are not checked by the CF checker (at least not the few that I have
> looked at in detail) and I think the best way to get consistent checking
> would be to first create a well structured summary of these rules in the
> conventions document.
>
> The specific proposal is add a new Appendix which lists the rules with
> examples where appropriate.
>
> It will take some time to complete the list. I propose that we add a
> provisional list, after agreeing the format and approach, and work
> towards completion later.
>
> = Appendix D: Rules associated with standard names =
>
> Some standard names bring additional constraints on the meta-data and/or
> data values of the variables they are associated with. This appendix list
> such names, grouped according to the types of constraint, and provides
> usage examples where needed.
>
> == Required Coordinates ==
>
> A common constraint involves the requirement that a particular coordinate
> or set of coordinates be present.
>
> The following table lists the rules and associated standard names. An
> explanation of each rule follows below.
>
> = Rule =||= Description =||
> ||= ''Standard Name(s)'' =||
> ||= '''Required coordinate(s)''' =||
> || 1 || Area Fraction || The fractional area in a cell covered by a
> particulate area type. ||
>  || ''area_fraction'' ||
>  || '''area_type''' ||
> || 2 || Lifted from || Parameters defined in terms of lifting from a
> reference level ||
>  ||''atmosphere_convective_available_potential_energy,
> atmosphere_convective_inhibition, atmosphere_level_of_free_convection,
> atmosphere_lifting_condensation_level'' ||
>  || '''original_air_pressure_of_lifted_parcel''' ||
> || 3 || Lifting range || Parameter defined in terms of lifting through a
> specified range  ||
>    ||
> ''temperature_difference_between_ambient_air_and_air_lifted_adiabatically''
> ||
>    ||
> '''original_air_pressure_of_lifted_parcel,final_air_pressure_of_lifted_parcel'''
> ||
> || 4 || Radiances || For radiance variables a direction must be specified
> ||
>   || ''downwelling_photosynthetic_photon_radiance_in_sea_water'' and
> others
>   ||  '''zenith_angle''' ||
> || 5 || Reference state || Variables which depend on reference air
> temperature and humidity ||
>    ||  ''mass_concentration_of_pm_*_ambient_aerosol_in_air,
> mass_fraction_of_pm_*_ambient_aerosol_in_air'' ||
> ||  '''air_temperature, relative_humidity''' ||
> || 6 || Wavelength || Functions of wavelength ||
>    ||  ''*_per_unit_wavelength_in_air'' ||
>    ||   '''radiation_wavelength''' ||
>
> In all cases, the structure follows the same pattern, illustrated by the
> following examples for case 1. Area Fraction:
>
> {{{
>float cropcover(lat,lon);
>   cropcover:standard_name = 'area_fraction';
>   cropcover:coordinates =  'crop';
>   cropcover:units = '1';
>character crop(nchar);
>   crop:standard_name = 'area_type';
>data:
>   crop = 'crop';
> }}}
>
> == Other rules ==
>
> === Quantities representing a layer average or sum ===
>
> Many "layer" quantities require vertical coordinates with bounds.
> * ''*_atmosphere_layer[_*]'';
> * ''*_ocean_layer[_*]'';
> * ''*_soil_layer[_*]'';
>
> === Variation of variables in sigma coordinates due to surface pressure
> change ===
> change_in_energy_content_of_atmosphere_layer_due_to_change_in_sigma_coordinate_wrt_surface_pressure:
> must have a vertical coordinate variable (axis=Z).
>
> {{{
>float deltae(sig);
>   deltae:standard_name =
> 'change_in_energy_content_of_atmosphere_layer_due_to_change_in_sigma_coordinate_wrt_surface_pressure';
>   deltae:units = 'J m-2';
>float sig(sig);
>   sig:axis = 'Z';
>   sig:standard_name = 'atmosphere_sigma_coordinate';
>   sig:bounds = 'sig_bnds';
>   sig:units = '1';
>float sig_bnds(2,sig);  # required because of _atmosphere_layer
> }}}
>
> === Temporal change ===
>
> Time rate of change or displacement over time require bounds on time
> coordinate:
>  * ''change_over_time_*'';
>  *