Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Difference between netcdf and tslist outputs

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
I noticed some differences between the wind speed magnitude computed from netcdf output and time series output. Both outputed were computed at the same location and time. Further details can be found below

*Compute high temporal resolution wind maps from tslist outputs

*tested on both WRF V4.0.2 and WRF V4.4.2
*3 hour run

*Comparison between PT001.d01.UU at 03:00 and U from wrfout_d01_2018-01-01_03:00:00 for the first level and for the same location
*Comparison between PT001.d01.VV at 03:00 and V from wrfout_d01_2018-01-01_03:00:00 for the first level and for the same location

My guess is that some bilinear interpolation might be done for the netcdf; Yet, but I can't track it in the source code.

Could you please give some clarification on these differences ?

Sincerely yours
How did you derive wind profile from the wrfout at the location specified in tslist? Please clarify.
Also, can you provide a plot to demonstrate how large thee difference is? Thanks.
Dear Ming Chen,
Thank you for these questions it allows me to see where the difference came from!

To obtain WRF wind speed magnitude from the tsfile I proceeded as follows:
-I edited share/wrf_timeries.F and computed the wind speed from earth_u_profile(k) and earth_v_profile(k) following the same formula shown in phys/modul_diag_trad_fields.F

To obtain WRF wind speed magnitude from the netcdf files I proceeded as follows:

-I used WRF V 4.0 and manually edited the bug on the wind speed magnitude corrected in more recent versions (cf correcting_wind_speed-bug_v4.0.png).
-in activated the diag_nwp2 in Registry/registry.trad_fields
-I added the wind speed computation of phys/modul_diag_trad_fields.F into the history so it's directly available in the netcdf files.
-I extracted the speed for the first level on each netcdf file using cdo: for i in wrfout_d01*; do cdo -selvar,SPEED $i ${i}.nc; done"
-I concatenated the SPEED value for each wrfout file: cdo cat wrfout_d01_*.nc outfile

-I extracted the value for a given locations: cdo -outputtab,date,time,lon,lat,value,name -selvar,SPEED -sellevel,1 -remapnn,"lon=2.216_lat=51.034" outfile > output_extract.csv

The problem came from the location provided in cdo. Instead of providing the location in the tsfile I should have provided the location that is the closest WRF grid, which is available in the tsfile header.

Sincerely yours
The wind components of U and V are earth-relative in the standard output of time series. However, U and V in netCDF files are grid-relative. In addition, for output of time series at a specified location, the model uses the data at the nearest grid to represent the data at the specified location. WRF doesn't do any interpolation. I am not sure whether there is any discrepancy between your method to process the data and the approach WRF uses. Please double check your codes.