Repository navigation
Updated hf - #1180
Updated hf#1180mgharamti wants to merge 2 commits into
Conversation
Modified the converter code to ingest both legacy radar and newer ones with different format.
hkershaw-brown
left a comment
There was a problem hiding this comment.
Hi Moha,
Couple of definite changes:
- The 'UNKNOWN' for station is not used, if there is no station name the uninitialized station variable is used.
- A write() statement has the string,* in the wrong order.
Typo and rst syntax:
- Some titles underlines are too short
- NetCDF typo
I'm not sure if you need to check for missing values nans in the read_new_totals, like you do in the read_old_totals - I put a comment there.
One thing to maybe think about is currently the formats are called 'old' and 'new'. I'd guess there is a non-zero chance that the formats will update again, then you will have to have a 'new-new'. You could name them v1, v2 or not worry until a 'new-new' version comes out.
Cheers,
Helen
| if (attin) then | ||
| call nc_check(nf90_inq_varid(ncid, 'station_name', varid), routine) | ||
| call nc_check(nf90_get_var(ncid, varid, station), routine) | ||
|
|
||
| call clarify_instrument(station) | ||
| else | ||
| instrument = 'UNKNOWN' | ||
| endif | ||
|
|
||
| instrument = station |
There was a problem hiding this comment.
instrument is getting set to station, whatever happens in this if statement. Is instrument = station only supposed to be set if the station_name attribute exists?
| if (attin) then | |
| call nc_check(nf90_inq_varid(ncid, 'station_name', varid), routine) | |
| call nc_check(nf90_get_var(ncid, varid, station), routine) | |
| call clarify_instrument(station) | |
| else | |
| instrument = 'UNKNOWN' | |
| endif | |
| instrument = station | |
| if (attin) then | |
| call nc_check(nf90_inq_varid(ncid, 'station_name', varid), routine) | |
| call nc_check(nf90_get_var(ncid, varid, station), routine) | |
| call clarify_instrument(station) | |
| instrument = station | |
| else | |
| instrument = 'UNKNOWN' | |
| endif | |
| phi = phi * rad2deg | ||
| if (debug) write(*, '(5X, A)') 'Incoming bearing is in radians.' | ||
| else | ||
| write(*, string1) 'Unknown angle units: '//trim(adjustl(angle_unit)) |
There was a problem hiding this comment.
This write statement has the variable, format backwards
| write(*, string1) 'Unknown angle units: '//trim(adjustl(angle_unit)) | |
| write(string1, *) 'Unknown angle units: '//trim(adjustl(angle_unit)) |
|
|
||
| The converter supports two data families: | ||
| The converter supports both **total (vector) currents** and **single-site radial currents**, | ||
| and can ingest NerCDF products from both the original and the new HF raadr systems. |
There was a problem hiding this comment.
| and can ingest NerCDF products from both the original and the new HF raadr systems. | |
| and can ingest NetCDF products from both the original and the new HF raadr systems. |
| do ix = 1, nx | ||
| do iy = 1, ny | ||
| rstd(ix, iy) = obs_err_sd_check(rstd(ix, iy)) | ||
| enddo | ||
| enddo |
There was a problem hiding this comment.
For the read_old_totals you have a check for NaN before calling obs_err_sd_check. I am not sure whether you need it with the read_new_totals just noticed the difference:
|
|
||
| **Radials files** (curvilinear x/y): | ||
| Radials | ||
| ~~~~~~ |
There was a problem hiding this comment.
| ~~~~~~ | |
| ~~~~~~~ |
| ^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| Totals | ||
| ~~~~~ |
There was a problem hiding this comment.
Getting warnings about all the title underlines:
/Users/hkershaw/DART/pull_requests/pull_1180/observations/obs_converters/HFradar/readme.rst:63: WARNING: Title underline too short.`
Totals
~~~~~
| ~~~~~ | |
| ~~~~~~ |
| current observations. | ||
|
|
||
| Totals | ||
| ~~~~~ |
There was a problem hiding this comment.
| ~~~~~ | |
| ~~~~~~ |
| + ``nsct_error``: observation-error standard deviation associated with ``nsct``. | ||
|
|
||
| Radials | ||
| ~~~~~~ |
There was a problem hiding this comment.
| ~~~~~~ | |
| ~~~~~~~ |
Description:
This updates the HFradar ocean obs converter allowing it to ingest frequency radar observation from old and new radar sites. The new radar sites have different file format. The new sites also provide the errors associated with the radial and total velocities, removing the need to parametrize the obs error as function of the radar range.
Types of changes
Documentation changes needed?
Tests
Ran the modified converter with old data files, new ones, and both old and new radar files at the same time.
Checklist for merging
Checklist for release
Testing Datasets
Datasets can be found here:
/glade/derecho/scratch/gharamti/inacawo/DART_training/observations/obs_converters/HFradar/data