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

How to use WRF outputs (in NetCDF Format) as boundary conditions

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.

katierobinson

New member
Hi,
I want to use the outputs from a previously run WRF simulation as the boundary conditions for another, higher resolution simulation.

I converted the wrfout* netcdf file to GRIB format using: cdo -v -f grb -copy -selgrid,1,5,6 wrfout_d01_1979-01-01_00:00:00 wrfout_d01_1979-01-01_00:00:00.grb

I then ran ungrib successfully, but when running metgrid I get the error: ERROR: The mandatory field TT was not found in any input data

I am using Vtable.ARW, but it does not appear to be able to find the T variable in the converted file.
cdo sinfo of the original file gives this:

File format: netCDF2
-1 : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter name
1 : unknown unknown instant 1 1 98441 1 F32 : LU_INDEX
2 : unknown unknown instant 1 1 26 2 F32 : ZNU
3 : unknown unknown instant 1 1 27 3 F32 : ZNW
4 : unknown unknown instant 1 1 4 4 F32 : ZS
5 : unknown unknown instant 1 1 4 4 F32 : DZS
6 : unknown unknown instant 1 1 98441 1 F32 : VAR_SSO
7 : unknown unknown instant 26 2 98728 5 F32 : U
8 : unknown unknown instant 26 2 98784 6 F32 : V
9 : unknown unknown instant 27 3 98441 1 F32 : W
10 : unknown unknown instant 27 3 98441 1 F32 : PH
11 : unknown unknown instant 27 3 98441 1 F32 : PHB
12 : unknown unknown instant 26 2 98441 1 F32 : T

But cdo sinfo of the converted grib file gives this:

File format: GRIB
-1 : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter name
1 : unknown unknown instant 1 1 98441 1 P16 : var1
2 : unknown unknown instant 1 1 98441 1 P16 : var6
3 : unknown unknown instant 26 2 98728 2 P16 : var7
4 : unknown unknown instant 26 2 98784 3 P16 : var8
5 : unknown unknown instant 27 3 98441 1 P16 : var9
6 : unknown unknown instant 27 3 98441 1 P16 : var10
7 : unknown unknown instant 27 3 98441 1 P16 : var11
8 : unknown unknown instant 26 2 98441 1 P16 : var12
9 : unknown unknown instant 1 1 98441 1 P16 : var19

How can I fix this so that the parameter names are not lost when converting from netcdf to grib? Or is there another way to use WRF outputs as boundary conditions for running WPS?

Thanks!
 
I wonder whether you can run ndown? I suppose ndown can do exactly what you want to. Please see the details at
https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.0/users_guide_chap5.html#_e._One-way_Nested

if for some reasons you don't want to run ndown, then I would suggest you extract required variables from wrfout files, write them in intermediate format, and then run metgrid.exe. In this case you don't need to go through the trouble to transfer wrfout to grib, and ungrib the files.
 
Thanks for your reply!
Is there a method you would recommend for extracting the required variables from wrfout files to write them in an intermediate format??
 
Below are the variables required for WPS (and later for running WRF):
Mandatory:
3d upper air: horizontal winds, temperature, relative humidity, geopotential height
3d soil: soil temperature and soil moisture
2d fields: surface pressure, sea-level pressure, land mask, Skin temperature, 2-m T & RH,, 10-m U and V
Optional (but desirable):
2d fields: topography elevation of input data, SST, sea-ice
Fortran codes, or NCL, or other post process tools like RIP and UPP can read wrfout files, put variables on pressure levels, and remap to different grids, etc. After that, you can write the data in intermediate format. Detailed description can be found at:
https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/v4.0/users_guide_chap3.html#_Writing_Meteorological_Data
 
Top