diff --git a/profiles_eval/configs/dlwind.json b/profiles_eval/configs/dlwind.json new file mode 100644 index 0000000..f971ffb --- /dev/null +++ b/profiles_eval/configs/dlwind.json @@ -0,0 +1,63 @@ +{ + "instrument_info": { + "name": "Doppler Lidar (Halo Streamline)", + "type": "lidar", + "instrument_class": "dlprofwind4news", + "level": "c1", + "requires_corrections": false + }, + "variables": { + "time": { + "name_in_file": "time", + "units": "sec" + }, + "range": { + "name_in_file": "height", + "units": "m" + }, + "u": { + "name_in_file": "u", + "units": "m/s" + }, + "u_error": { + "name_in_file": "u_error", + "units": "m/s" + }, + "v": { + "name_in_file": "v", + "units": "m/s" + }, + "v_error": { + "name_in_file": "v_error", + "units": "m/s" + }, + "w": { + "name_in_file": "w", + "units": "m/s" + }, + "w_error": { + "name_in_file": "w_error", + "units": "m/s" + }, + "wind_speed": { + "name_in_file": "wind_speed", + "units": "m/s" + }, + "wind_speed_error": { + "name_in_file": "wind_speed_error", + "units": "m/s" + }, + "wind_direction": { + "name_in_file": "wind_direction", + "units": "deg" + }, + "wind_direction_error": { + "name_in_file": "wind_direction_error", + "units": "deg" + } + }, + "coordinates": { + "time": "time", + "range": "range" + } +} diff --git a/profiles_eval/configs/dlwindstat.json b/profiles_eval/configs/dlwindstat.json new file mode 100644 index 0000000..d46eb54 --- /dev/null +++ b/profiles_eval/configs/dlwindstat.json @@ -0,0 +1,51 @@ +{ + "instrument_info": { + "name": "Doppler Lidar (Halo Streamline)", + "type": "lidar", + "instrument_class": "dlprofwstats4news", + "level": "c1", + "requires_corrections": false + }, + "variables": { + "time": { + "name_in_file": "time", + "units": "sec" + }, + "range": { + "name_in_file": "height", + "units": "m" + }, + "cloud_base": { + "name_in_file": "dl_cbh", + "units": "m" + }, + "cloud_base_25_percentile": { + "name_in_file": "dl_cbh_25", + "units": "m" + }, + "cloud_base_75_percentile": { + "name_in_file": "dl_cbh_75", + "units": "m" + }, + "cloud_base_vertical_velocity": { + "name_in_file": "cbw", + "units": "m/s" + }, + "cloud_base_vertical_velocity_25_percentile": { + "name_in_file": "cbw_25", + "units": "m/s" + }, + "cloud_base_vertical_velocity_75_percentile": { + "name_in_file": "cbw_75", + "units": "m/s" + }, + "cloud_base_updraft_fracion": { + "name_in_file": "cbw_up_fraction", + "units": "1" + } + }, + "coordinates": { + "time": "time", + "range": "range" + } +} diff --git a/profiles_eval/real_prof_io.py b/profiles_eval/real_prof_io.py index 7451c07..21fa5a5 100644 --- a/profiles_eval/real_prof_io.py +++ b/profiles_eval/real_prof_io.py @@ -986,6 +986,11 @@ def export_dataset( ds_out = xr.Dataset(coords={**ordered_coords, **other_coords}, attrs=ds.attrs) for v in ds.data_vars: ds_out[v] = ds[v] + + # Set range coordinate attributes if range exists + if "range" in ds_out.coords: + ds_out["range"].attrs["long_name"] = "Range to measurement volume" + ds_out["range"].attrs["units"] = "km" # Materialise any dask-backed arrays before writing. open_mfdataset # returns lazy arrays; driving them through to_netcdf via the dask diff --git a/profiles_eval/real_prof_main.py b/profiles_eval/real_prof_main.py index 2dca325..744260a 100644 --- a/profiles_eval/real_prof_main.py +++ b/profiles_eval/real_prof_main.py @@ -39,11 +39,13 @@ ALL_INSTRUMENTS = [ "ceil", "ceilpol", - "dl", "hsrl", + "rl", "minimpl", "mpl", - "rl", + "dl", + "dlwindstat", + "dlwind", "interpolatedsonde", ]