Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ctgh committed Jun 27, 2024
1 parent fa65aa2 commit a662ba6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 20 deletions.
5 changes: 5 additions & 0 deletions etc/ukv/cx/Radar.nl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
&CXControlNL
! These STASH codes correspond to the following variables:
! 2: upper-air u
! 3: upper-air v
! 33: orography
! 150: upper-air w
CxFields=2,3,33,150
/
7 changes: 7 additions & 0 deletions etc/ukv/varobs/Radar.nl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
&VarobsControlNL
! These indices correspond to the following variables:
! 63: Radial velocity
! 64: Beam tilt (elevation in OPS terminology)
! 65: Gate range
! 66: Gate azimuth
! 69: Station identifier
! 75: Station elevation (altitude above MSL in OPS terminology)
Varfields=63,64,65,66,69,75
/
40 changes: 20 additions & 20 deletions src/opsinputs/opsinputs_fill_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,11 @@ end subroutine opsinputs_fill_fillelementtype2dfromsimulatedvariable
!> \param[in] JediValueVarName
!> Name of the JEDI variable containing observation values.
!> \param[in] JediValueGroup
!> Group of the JEDI variable containing observation values.
!> Group name of the JEDI variable containing observation values.
!> \param[in] JediErrorVarName
!> (Optional) Name of the JEDI variable containing observation errors.
!> \param[in] JediErrorGroup
!> (Optional) Group of the JEDI variable containing observation errors.
!> (Optional) Group name of the JEDI variable containing observation errors.
!> \param[in] PackPGEs
!> Optional; true by default. If set to false, PGEs won't be stored in packed form.
!> The Ops_VarobPGEs subroutine expects PGEs to be stored in packed form for most varobs fields,
Expand Down Expand Up @@ -694,11 +694,11 @@ end subroutine opsinputs_fill_fillelementtypefromnormalvariable
!> \param[in] JediValueVarName
!> Name of the JEDI variable containing observation values.
!> \param[in] JediValueGroup
!> Group of the JEDI variable containing observation values.
!> Group name of the JEDI variable containing observation values.
!> \param[in] JediErrorVarName
!> (Optional) Name of the JEDI variable containing observation errors.
!> \param[in] JediErrorGroup
!> (Optional) Group of the JEDI variable containing observation errors.
!> (Optional) Group name of the JEDI variable containing observation errors.
!> \param[in] PackPGEs
!> Optional; true by default. If set to false, PGEs won't be stored in packed form.
!> The Ops_VarobPGEs subroutine expects PGEs to be stored in packed form for most varobs fields,
Expand Down Expand Up @@ -830,13 +830,13 @@ end subroutine opsinputs_fill_fillelementtype2dfromnormalvariable
!> \param[in] JediValueVarName
!> Name of the JEDI variable containing observation values.
!> \param[in] JediValueGroup
!> Group of the JEDI variable containing observation values.
!> Group name of the JEDI variable containing observation values.
!> \param[in] LevelsAreTopToBottom
!> A logical to specify if the levels being passed in are top to bottom in the atmosphere.
!> \param[in] JediErrorVarName
!> (Optional) Name of the JEDI variable containing observation errors.
!> \param[in] JediErrorGroup
!> (Optional) Group of the JEDI variable containing observation errors.
!> (Optional) Group name of the JEDI variable containing observation errors.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -951,7 +951,7 @@ end subroutine opsinputs_fill_fillelementtype2dfromnormalvariablewithlevels
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Real1.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real1.
!> Group name of the JEDI variable used to populate \p Real1.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -1031,7 +1031,7 @@ end subroutine opsinputs_fill_fillreal
!> variable with no channel suffix (in which case \p Real2 will have only a single row) or a set
!> of variables with suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!> \param[in] compressVarChannels
!> Whether to apply var channel compression (No NaN spaces between channels)
!> \param[in] sizeOfVarobsArray
Expand Down Expand Up @@ -1166,7 +1166,7 @@ end subroutine opsinputs_fill_fillreal2d_norecords
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Real2.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -1255,7 +1255,7 @@ end subroutine opsinputs_fill_fillreal2d_records
!> suffix (in which case \p Real2 will have only a single row) or a set of variables with
!> suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -1765,7 +1765,7 @@ end subroutine opsinputs_fill_fillreal2dfromgeovalformultilevelobs
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Int1.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Int1.
!> Group name of the JEDI variable used to populate \p Int1.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -1844,7 +1844,7 @@ end subroutine opsinputs_fill_fillinteger
!> suffix (in which case \p Int2 will have only a single row) or a set of variables with
!> suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Int2.
!> Group name of the JEDI variable used to populate \p Int2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -1919,7 +1919,7 @@ end subroutine opsinputs_fill_fillinteger2d
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p String1.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p String1.
!> Group name of the JEDI variable used to populate \p String1.
!> \param[in] ConvertIntToSTring
!> Convert an integer-valued ObsSpace vector to a string.
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
Expand Down Expand Up @@ -2016,7 +2016,7 @@ end subroutine opsinputs_fill_fillstring
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Real1.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real1.
!> Group name of the JEDI variable used to populate \p Real1.
!> \param[in] ReferenceTime
!> Reference time. JEDI datetimes will be converted into offsets from this time.
!>
Expand Down Expand Up @@ -2092,7 +2092,7 @@ end subroutine opsinputs_fill_filltimeoffsets
!> variable with no channel suffix (in which case \p Real2 will have only a single row) or a set
!> of variables with suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!> \param[in] ReferenceTime
!> Reference time. JEDI datetimes will be converted into offsets from this time.
!>
Expand Down Expand Up @@ -2167,7 +2167,7 @@ end subroutine opsinputs_fill_filltimeoffsets2d_norecords
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Real2.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!> \param[in] ReferenceTime
!> Reference time. JEDI datetimes will be converted into offsets from this time.
!>
Expand Down Expand Up @@ -2263,7 +2263,7 @@ end subroutine opsinputs_fill_filltimeoffsets2d_records
!> suffix (in which case \p Real2 will have only a single row) or a set of variables with
!> suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Real2.
!> Group name of the JEDI variable used to populate \p Real2.
!> \param[in] ReferenceTime
!> Reference time. JEDI datetimes will be converted into offsets from this time.
!>
Expand Down Expand Up @@ -2331,7 +2331,7 @@ end subroutine opsinputs_fill_filltimeoffsets2d
!> variable with no channel suffix (in which case \p Coord2 will have only a single row) or a set
!> of variables with suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Coord2.
!> Group name of the JEDI variable used to populate \p Coord2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -2400,7 +2400,7 @@ end subroutine opsinputs_fill_fillcoord2d_norecords
!> \param[in] JediVarName
!> Name of the JEDI variable used to populate \p Coord2.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Coord2.
!> Group name of the JEDI variable used to populate \p Coord2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down Expand Up @@ -2472,7 +2472,7 @@ end subroutine opsinputs_fill_fillcoord2d_records
!> suffix (in which case \p Coord2 will have only a single row) or a set of variables with
!> suffixes corresponding to the indices specified in \p Channels.
!> \param[in] JediGroup
!> Group of the JEDI variable used to populate \p Coord2.
!> Group name of the JEDI variable used to populate \p Coord2.
!>
!> \note This function returns early (without a warning) if the specified JEDI variable is not found.
!> We rely on warnings printed by the OPS code whenever data needed to output a requested varfield
Expand Down
4 changes: 4 additions & 0 deletions test/generate_unittest_netcdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ def output_1d_simulated_var_to_netcdf(var_name, file_name, with_bias=False, rada

# Station ID
if radar_doppler_wind:
# The radar Doppler wind processing uses integers for station identification because
# `MetaData/stationIdentification` is mapped to the ODB variable `rad_ident`,
# which is an integer.
var = f.createVariable('MetaData/stationIdentification', 'i', ('Location'))
var[:] = [1, 2, 3, 4]
else:
# In all other cases, `MetaData/stationIdentification` is a string.
var = f.createVariable('MetaData/stationIdentification', str, ('Location'))
for i, s in enumerate(["station_1", "station_2", "station_3", "station_4"]):
var[i] = s
Expand Down

0 comments on commit a662ba6

Please sign in to comment.