How to edit GFS input gribs?

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

How to edit GFS input gribs?

Post by meteoadriatic » Sat Sep 21, 2013 6:50 pm

Does anybody have knowledge about how to manipulate contents of GFS input files, for example, how to change values of some variable? I would like to do some hacking, particularly with snow on the ground during winter time, but I have no idea how to proceed.

Thanks

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: How to edit GFS input gribs?

Post by Antonix » Mon Sep 23, 2013 9:04 am

meteoadriatic hello!
this road is good!? viewtopic.php?f=6&t=494

or you can edit the file netcdf.
I use matlab, but if you want we can work on something more "operational"

meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

Re: How to edit GFS input gribs?

Post by meteoadriatic » Mon Sep 23, 2013 12:59 pm

Now I see that topic, I somehow missed that. It looks promising though! I'll take a look at that :)

meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

Re: How to edit GFS input gribs?

Post by meteoadriatic » Mon Sep 23, 2013 1:20 pm

However I don't like that approach for operational needs.

I think changes should be done if possible on the intermediate format files, not on gribs, because it would save us decompressing and compressing again grib file.

However it doesn't look like simple task. I found something that might be a guideline...
http://forum.wrfforum.com/viewtopic.php?f=22&t=2481

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: How to edit GFS input gribs?

Post by Antonix » Mon Sep 23, 2013 1:45 pm

this is a good way.
but I did not understand how to change the variable.
I could try to create an executable in matlab.
with only 3 commands opens, modify&write and save the netcdf.
which variable you want to change??

meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

Re: How to edit GFS input gribs?

Post by meteoadriatic » Mon Sep 23, 2013 1:56 pm

But intermediate files are not netcdf. Netcdf are created from metgrid, intermediate files are created before, from ungrib.

However, editing netcdf is also good idea and maybe even easier.

About details, well, I would like to hack a little bit the snow coverage on the ground. It is common problem that snow coverage in GFS is way too much spreaded from mountains into low-altitude land, and so it makes daily WRF temperature in those low-altitude areas that are in reality free of snow cover, much lower than they should be.

So I got an idea; what if we could completely remove snow cover from, lets say, areas where it's depth is below 10cm, or, it's percent coverage is below 30% (I'm not sure which of those two is in files)? Could this improve forecasts? I know one project where they did exactly that. However, they didn't replied when I asked how it is done.

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: How to edit GFS input gribs?

Post by Antonix » Mon Sep 23, 2013 2:06 pm

resigned, this forum is one of the few places where we share 100% of the knowledge;-).

I think it is very easy to work in matlab or octave.
it would be trivial for me, I feel tonight.
I would like to change the temperature on the ground,
by removing the bias calculated with the weather stations, but also your editing is more important!

is a good idea to work on the file wrfinput_d01

what you think!?

meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

Re: How to edit GFS input gribs?

Post by meteoadriatic » Mon Sep 23, 2013 2:20 pm

Try if you think you can. I never used matlab or octave so unfortunately cannot assist you much.

For temperature bias, I think better approach is to nudge model with obsgrid because you can have better control over influence of your observations:

http://www.mmm.ucar.edu/wrf/users/docs/ ... _chap7.htm

Theocarter2911 also thinks about working this out:
viewtopic.php?f=8&t=16&p=3003#p3002

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: How to edit GFS input gribs?

Post by Antonix » Tue Sep 24, 2013 12:04 pm

I'm working on the program in matlab.
but I have a great doubt.
but the grib files do not contain the rain??
met_XYZ files do not contain the rain??
WRF calculated as the rain at the first instant??

maybe it's a stupid question ...

meteoadriatic
Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am

Re: How to edit GFS input gribs?

Post by meteoadriatic » Tue Sep 24, 2013 12:43 pm

Grib files does contain precipitation, but those fields are lost after ungrib because these are not input variables for WRF. So, intermediate format and netcdf does not contain precipitation.

It should be there snow on the ground, though.

Post Reply