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

Replace usage of ioda v1 naming with ioda v2 naming #1286

Open
srherbener opened this issue Jul 7, 2023 · 4 comments
Open

Replace usage of ioda v1 naming with ioda v2 naming #1286

srherbener opened this issue Jul 7, 2023 · 4 comments

Comments

@srherbener
Copy link
Collaborator

Description

We need to go through all of the YAML configuration files and code, and replace the "variable@group" (ioda v1 naming) specifications with "group/variable" (ioda v2 naming).

Some examples where the ioda v1 naming is used:

iodaconv/test/testinput/bufr_filtering.yaml:        - name: "radiance@ObsValue"
iodaconv/src/ncar-bufr2nc-fortran/gnssro_mod.f90:      call check(nf90_def_var(ncid, "record_number@MetaData", NF90_INT, nlocs_dimid, varid_recn))
iodaconv/src/ncep/config/NC001113.yaml:- - ice_situation@ObsValue
iodaconv/src/ncep/bufr2ncObsTypes.py:                           ActualValues[i]['msg_date@MetaData'] = MsgDate

Mike Cooke from the Met Office supplied a script that may be helpful with this task. See https://github.com/JCSDA-internal/ioda/issues/379#issuecomment-1614810874 for more information.

Requirements

All YAML files and code need to get updated to ioda v2 syntax so that eventually we can deprecate the ioda v1 syntax.

Acceptance Criteria (Definition of Done)

All instances of "variable@group" have been replaced with "group/variable".
All ctests pass

Dependencies

None.

@BenjaminRuston
Copy link
Collaborator

@srherbener sigh, think we've done most of this but should see if we don't have a technical debt label

@BenjaminRuston
Copy link
Collaborator

@srherbener is this done? or work yet to be scoped? should it be closed

@srherbener
Copy link
Collaborator Author

I'm still seeing a lot of usage of the v1 syntax:

iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "satellite@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "datetime@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "longitude@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "latitude@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "satellite_wind_calculation_method@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "satellite_zenith_angle@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "satellite_channel_center_frequency@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "originating_generating_center@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "satellite_wind_quality_mark@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "extended_height_assignment_method@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "pressure@ObsValue"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "wind_direction@ObsValue"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "wind_speed@ObsValue"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "tracking_correlation_of_vector@ObsValue"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "coefficient_of_variation@ObsValue"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "generating_application@MetaData"
iodaconv/tools/run_satwnds/satwnds_new_subset_template.yaml:        - name: "percent_confidence@ObsValue"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "satellite@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "datetime@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "longitude@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "latitude@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "satellite_wind_calculation_method@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "satellite_channel_center_frequency@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "satellite_zenith_angle@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "originating_generating_center@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "satellite_wind_quality_mark@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "height_assignment_method@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "generating_application@MetaData"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "pressure@ObsValue"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "wind_direction@ObsValue"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "wind_speed@ObsValue"
iodaconv/tools/run_satwnds/satwnds_old_subset_template.yaml:        - name: "percent_confidence@ObsValue"


iodaconv/src/pyiodaconv/ioda_conv_ncio.py:            NcVname = "{0:s}@{1:s}".format(Vname, Gname)
iodaconv/src/pyiodaconv/ioda_conv_ncio.py:            ToffsetName = "time@{0:s}".format(MdataGroup)
iodaconv/src/pyiodaconv/ioda_conv_ncio.py:            NcVname = "{0:s}@{1:s}".format(Vname, MdataGroup)
iodaconv/src/pyiodaconv/ioda_conv_ncio.py:                if (NcVname == "datetime@MetaData"):
iodaconv/src/pyiodaconv/ioda_conv_ncio.py:            if (NcVname == "datetime@MetaData"):
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      which becomes the value for each location in datetime@MetaData.
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      LW_wnum(LWchannel) -> channel_wavenumber@VarMetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_Latitude(LWdetector)  -> latitude@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_Longitude(LWdetector) -> longitude@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_SolarZenith(LWdetector) -> solar_zenith_angle@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_SolarAzimuth(LWdetector) -> solar_azimuth_angle@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_SatelliteZenith(LWdetector) -> sensor_zenith_angle@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      IRLW_SatelliteAzimuth(LWdetector) -> sensor_azimuth_angle@MetaData
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      ES_RealLW(LWchannel, Lwdetector) -> brightness_temperature_#@ObsValue
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      locations to 0 for brightness_temperature_#@PreQC and setting all locations
iodaconv/src/ssec/giirs_ssec2ioda.py:        #      to 2.0 for brightness_temperature_#@ObsError.
iodaconv/src/ssec/giirs_lw2ioda.py:        #      which becomes the value for each location in datetime@MetaData.
iodaconv/src/ssec/giirs_lw2ioda.py:        #      LW_wnum(LWchannel) -> channel_wavenumber@VarMetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_Latitude(LWdetector)  -> latitude@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_Longitude(LWdetector) -> longitude@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_SolarZenith(LWdetector) -> solar_zenith_angle@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_SolarAzimuth(LWdetector) -> solar_azimuth_angle@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_SatelliteZenith(LWdetector) -> sensor_zenith_angle@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      IRLW_SatelliteAzimuth(LWdetector) -> sensor_azimuth_angle@MetaData
iodaconv/src/ssec/giirs_lw2ioda.py:        #      ES_RealLW(LWchannel, Lwdetector) -> longwave_radiance_#@ObsValue
iodaconv/src/ssec/giirs_lw2ioda.py:        #      locations to 0 for longwave_radiance_#@PreQC and setting all locations
iodaconv/src/ssec/giirs_lw2ioda.py:        #      to 2.0 for longwave_radiance_#@ObsError.
iodaconv/src/gsi_ncdiag/README.md:Note: that the output to the IODA observation file will be a variable named `air_temperature@GsiHofX` with input from
iodaconv/src/gsi_ncdiag/README.md:Note: that the output to the IODA observation file will be a variable named `sensor_channel@VarMetaData` with length = nchannels and with input from 
iodaconv/src/gsi_ncdiag/combine_files.py:            vs = key.split('@')
iodaconv/src/gsi_ncdiag/combine_files.py:                            units = ncf.variables[vs[0]+"@ObsValue"].getncattr("units")
iodaconv/src/gsi_ncdiag/combine_files.py:                        units = ncf.variables[vs[0]+"@MetaData"].getncattr("units")
iodaconv/src/gsi_ncdiag/combine_files.py:                tmpdata = np.ones_like(np.array(ncf.variables['record_number@MetaData'])).astype(DataVType[idx2])
iodaconv/src/gsi_ncdiag/combine_files.py:        ridx = np.argwhere(np.array(MetaVars) == 'record_number@MetaData')[0][0]
iodaconv/src/gsi_ncdiag/combine_files.py:        outdata[tuple(vname.split('@'))] = tmp
iodaconv/src/ncar-bufr2nc-fortran/README.md:100 is added to the @PreQC value when the ob is flagged as not-use by filter_obs_conv.  
iodaconv/src/ncar-bufr2nc-fortran/ufo_variables_mod.F90:!@mzp strings have to be same MAXVARLEN length for array constructor
iodaconv/src/ncar-bufr2nc-fortran/ufo_variables_mod.F90:!@mzp var_aerosols_gocart_esrl =[&
iodaconv/src/bufr/DataObject.h:        /// \param name The name to associate with the variable (ex "latitude@MetaData")
iodaconv/src/bufr/DataObject.h:        /// \param name The name to associate with the variable (ex "latitude@MetaData")
iodaconv/src/ncep/config/NC031120.yaml:- - corrected_report_indicator@MetaData
iodaconv/src/ncep/config/NC031120.yaml:- - satellite_identifier@MetaData
iodaconv/src/ncep/config/NC031120.yaml:- - year@MetaData
iodaconv/src/ncep/config/NC031120.yaml:- - month@MetaData
...
Many entries in many YAML files
...
iodaconv/src/ncep/config/NC001002.yaml:- - height@MetaData
iodaconv/src/ncep/config/NC001002.yaml:- - discharge_significance@MetaData
iodaconv/src/ncep/config/NC001002.yaml:- - discharge@MetaData
iodaconv/src/ncep/README.md:The users can update the yaml file according to their own naming requirements for the NetCDF variable names, e.g., JEDI requires significant wave height: height_of_waves@ObsValue.
iodaconv/src/ncep/bufr2ncObsTypes.py:            [['msg_type@MetaData', '', cm.DTYPE_STRING, ['nlocs', 'nstring'], [self.nlocs, self.nstring]],
iodaconv/src/ncep/bufr2ncObsTypes.py:             ['msg_date@MetaData', '', cm.DTYPE_UINT, ['nlocs'], [self.nlocs]]]
iodaconv/src/ncep/bufr2ncObsTypes.py:                    ActualValues[i]['msg_type@MetaData'] = MsgType
iodaconv/src/ncep/bufr2ncObsTypes.py:                    ActualValues[i]['msg_date@MetaData'] = MsgDate
iodaconv/src/ncep/bufr2ncObsTypes.py:                    [ActualValues[i]['datetime@MetaData']] = self.calc_obs_date_time(ActualValuesBufr[i])
iodaconv/src/ncep/ncep_classes.py:            ['datetime@MetaData', '', cm.DTYPE_STRING, ['nlocs', 'nstring'], [self.nlocs, self.nstring]])
iodaconv/src/ncep/ncep_classes.py:                if '@ObsValue' in (" ".join(map(str, k))):
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'record_number@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'latitude@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'longitude@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'time@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'impact_height@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'impact_parameter@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'earth_radius_of_curvature@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'geoid_height_above_reference_ellipsoid@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'occulting_sat_id@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'occulting_sat_is@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'process_center@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'gnss_sat_class@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'sensor_azimuth_angle@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'ascending_flag@MetaData', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'bending_angle@ObsValue', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'bending_angle@PreQC', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'bending_angle@GsiFinalObsErrorInv', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'bending_angle@GsiAdjustObsErrorInv', varid_meta))
iodaconv/src/gnssro/gnssro_gsidiag2ioda.f90:   call check(NF90_INQ_VARID(ncid_in, 'bending_angle@GsiHofX', varid_meta))
iodaconv/src/wrfda_ncdiag/README.md:Note: that the output to the IODA observation file will be a variable named `brightness_temperatureCH@WrfdaHofX` with input from

On one hand it would be nice to eradicate the usage of the v1 syntax, but on the other we can handle it and I think it might not be worth the effort since there is still a lot of places I found the usage. I trimmed down the listing above for posting in this issue - deleted something like 1300 lines. Perhaps we could write a script to help but I think we should consider whether it's worth the effort.

@rmclaren
Copy link
Contributor

@srherbener The BUFR related YAML files need to be removed anyways, so wouldn't bother with them. See #1586.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants