convert CSV file to little_r format

Problems with data in 3DVAR.

convert CSV file to little_r format

Postby lyndonmark » Wed Mar 20, 2013 8:48 pm

Hi,

How can I convert a csv file to little_r format? I would like to assimilate observation data using WRF. I have to do observation nudging in wrf and use a "little_r" format readable by wrf?
Any suggestion on how should i do this?

thanks
lyndonmark
 
Posts: 4
Joined: Wed Mar 20, 2013 7:50 pm

Re: convert CSV file to little_r format

Postby lyndonmark » Tue Mar 26, 2013 3:03 am

Hi all,
I would like to convert a CSV file containing the following data to Little_r_format..
These are the column names..In total there are 20 columns
and there are 20 089 data

Stn. No.
Year Month
Day
Stn. Press
MSLP
Dry Bulb
Wet Bulb
Max. Temp.
Min. Temp
Rainfall
Ave.WS
Prevailing WD
Max.WS
Dir. Of MaxWD
Time of MaxWD
Minutes of Sunshine
Mean Cloudiness
Thunderstorm
Lightning


Can anyone help me?after i convert this to little_r format I can now input this in wrf
lyndonmark
 
Posts: 4
Joined: Wed Mar 20, 2013 7:50 pm

Re: convert CSV file to little_r format

Postby jjasonlam » Mon Nov 07, 2016 5:41 am

I know the post seems to be kinda old however I am having the same question as well.
Have you figure out the solution or can anybody help?
jjasonlam
 
Posts: 9
Joined: Mon Oct 31, 2016 9:45 am

Re: convert CSV file to little_r format

Postby carsonbn » Thu Oct 19, 2017 5:13 pm

In case anyone else runs into this question... It's my understanding that converting CSV to Little_R Format is relatively straightforward assuming you have slightly more than a beginner background in programming (like me).

Each observation report is considered a "Report" when you are writing a Little R file. Each Report will have 3 records: a header record, a data record, and an ending record. Finally, there are 3 tail integers for each Report. You must have all of these parts for a complete Report even if the values aren't used within OBSPROC.

In the Header Record, you have 46 different columns of data from latitude, longitude, station ID, etc to the precipitable water data and the PW quality control flag.

In the Data Record, you have 20 columns of data including pressure, height, temperature, dew point, wind speed, wind direction, U, V, relative humidity, and thickness plus the corresponding QC flags for each variable.

The Ending Record is a signal to OBSPROC that the observation report is ending. The only important field is Field Number 1, which must contain the "end record" flag value of -777777.00000. The remaining 19 fields can contain any value because the values are unused by the OBSPROC, but needs to have the column structure.

Finally, the Tail Integers are considered "legacy fields", and are also unused by OBSPROC just like most of the Ending Record. However, just like the Ending Record, the columns must still exist even if the values are unused to OBSPROC can properly read the observation report.

This presentation from the July 2017 WRFDA Tutorial has more information on many of the Little R file formatting details: http://www2.mmm.ucar.edu/wrf/users/wrfd ... DA_obs.pdf.

Best of luck to you!
carsonbn
 
Posts: 3
Joined: Thu Oct 19, 2017 4:41 pm


Return to Data Issues

Who is online

Users browsing this forum: No registered users and 1 guest