Running WRF with ECMWF ERA-Interim Dataset

Dataset specific topics involving WPS.

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby darnold » Wed Jan 19, 2011 3:29 am

The problem with the 6 domains was simply due to an error from my side when writing the namelist.wps, However the other problem persist. Any help would be much appreciated!!! Is there anyone out there who runs wrf successfully with ERA-interim data in model levels?
darnold
 
Posts: 13
Joined: Wed Feb 17, 2010 5:28 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby tomtomme » Wed Mar 02, 2011 2:07 pm

Hi Darnold,

I now try to use the Vtable ECMWF_sigma with the model-level data too. About your persisting problem I have only the suggestion to stay with 60 levels and not reduce them to 40. Maybe that helps.

A question I have is about the two parameters from the Vtable
- 134 | 1 | 0 | | PSFC | Pa | Surface Pressure
- 134 | 109 | 1 | | PSFCH | Pa

Where can I get them in the full 0.7° resolution? My data comes from the CERA-DB (http://cera-www.dkrz.de/WDCC/ui/EntryLi ... N_SFC00_6H). But they don´t have 134. One hint from the CERA guys was to derive PSFC from 152 (LOGSFP), what seems to be possible. But what is this PSFCH exactly? It´s documented nowhere. Even when I look in Darnolds ungrib.log it is missing there too! So do I need it at all?

Another question: What is this error message about, when running ungrib:

Code: Select all
./ungrib.exe
 *** Starting program ungrib.exe ***
Start_date =  1989-01-01_00:00:00 ,      End_date = 1989-01-01_00:00:00
output format is WPS
Path to intermediate files is ./
 ungrib - grib edition num            1
 Unknown ksec2(4):            50
*** glibc detected *** ./ungrib.exe: free(): invalid pointer: 0x000000000070c5f0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b41ad70931e]
/lib64/libc.so.6(__libc_free+0x6c)[0x2b41ad70ad7c]
/lib64/libc.so.6[0x2b41ad722ae8]
/lib64/libc.so.6[0x2b41ad72322e]
./ungrib.exe[0x45cbef]
======= Memory map: ========
00400000-004a0000 r-xp 00000000 9cd:9a4fe 15761669                       /scratch/work/ucccli/u233116/WPS321/ungrib/src/ungrib.exe
006a0000-006fb000 rwxp 000a0000 9cd:9a4fe 15761669                       /scratch/work/ucccli/u233116/WPS321/ungrib/src/ungrib.exe
006fb000-0072a000 rwxp 006fb000 00:00 0                                  [heap]
2b41ad20a000-2b41ad225000 r-xp 00000000 08:01 2452802                    /lib64/ld-2.4.so
2b41ad225000-2b41ad227000 rwxp 2b41ad225000 00:00 0
2b41ad238000-2b41ad239000 rwxp 2b41ad238000 00:00 0
2b41ad324000-2b41ad326000 rwxp 0001a000 08:01 2452802                    /lib64/ld-2.4.so
2b41ad326000-2b41ad32e000 r-xp 00000000 08:01 2452839                    /lib64/librt-2.4.so
2b41ad32e000-2b41ad42d000 ---p 00008000 08:01 2452839                    /lib64/librt-2.4.so
2b41ad42d000-2b41ad42f000 rwxp 00007000 08:01 2452839                    /lib64/librt-2.4.so
2b41ad42f000-2b41ad443000 r-xp 00000000 08:01 2452835                    /lib64/libpthread-2.4.so
2b41ad443000-2b41ad542000 ---p 00014000 08:01 2452835                    /lib64/libpthread-2.4.so
2b41ad542000-2b41ad544000 rwxp 00013000 08:01 2452835                    /lib64/libpthread-2.4.so
2b41ad544000-2b41ad548000 rwxp 2b41ad544000 00:00 0
2b41ad548000-2b41ad59c000 r-xp 00000000 08:01 2452817                    /lib64/libm-2.4.so
2b41ad59c000-2b41ad69b000 ---p 00054000 08:01 2452817                    /lib64/libm-2.4.so
2b41ad69b000-2b41ad69d000 rwxp 00053000 08:01 2452817                    /lib64/libm-2.4.so
2b41ad69d000-2b41ad69e000 rwxp 2b41ad69d000 00:00 0
2b41ad69e000-2b41ad7d4000 r-xp 00000000 08:01 2452809                    /lib64/libc-2.4.so
2b41ad7d4000-2b41ad8d4000 ---p 00136000 08:01 2452809                    /lib64/libc-2.4.so
2b41ad8d4000-2b41ad8d7000 r-xp 00136000 08:01 2452809                    /lib64/libc-2.4.so
2b41ad8d7000-2b41ad8d9000 rwxp 00139000 08:01 2452809                    /lib64/libc-2.4.so
2b41ad8d9000-2b41adbe0000 rwxp 2b41ad8d9000 00:00 0
2b41adc00000-2b41adc21000 rwxp 2b41adc00000 00:00 0
2b41adc21000-2b41add00000 ---p 2b41adc21000 00:00 0
2b41add00000-2b41add16000 r-xp 00000000 9cd:9a4fe 26322091               /scratch/work/system/sw/sles10-x64/GCC/gnutools-4.3.3a/lib64/libgcc_s.so.1
2b41add16000-2b41adf16000 ---p 00016000 9cd:9a4fe 26322091               /scratch/work/system/sw/sles10-x64/GCC/gnutools-4.3.3a/lib64/libgcc_s.so.1
2b41adf16000-2b41adf17000 rwxp 00016000 9cd:9a4fe 26322091               /scratch/work/system/sw/sles10-x64/GCC/gnutools-4.3.3a/lib64/libgcc_s.so.1
7ffffd88a000-7ffffd8a0000 rwxp 7ffffd88a000 00:00 0                      [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
Abbruch


For the low resolution pressure level version of ERAInterim from the public ECMWF page all worked fine....

Thanks for any hint, Thomas
tomtomme
 
Posts: 7
Joined: Tue Nov 23, 2010 9:11 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby tomtomme » Fri Mar 04, 2011 11:46 am

I found a solution until real.exe. I converted the ERA-Interim Surface Pressure (Code 152) from the original SphericalHarmonics Format to a gridded-format with cdo (https://code.zmaw.de/projects/cdo). Then the error disapeared - not that I realy understand why...
metgrid.exe then only warned about

WARNING: Entry in METGRID.TBL not found for field LOGSFP. Default options will be used for this field!
WARNING: Entry in METGRID.TBL not found for field SOILGEO. Default options will be used for this field!

but that´s ok I guess. real.exe then has this error:

-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 3717
troubles, could not find trapping x locations
-------------------------------------------

Any idea somenone? Thx
Here the whole output:
Code: Select all
Namelist dfi_control not found in namelist.input. Using registry defaults for v
 ariables in dfi_control
 Namelist tc not found in namelist.input. Using registry defaults for variables
 in tc
 Namelist scm not found in namelist.input. Using registry defaults for variables
  in scm
 Namelist fire not found in namelist.input. Using registry defaults for variable
 s in fire
  Ntasks in X            1, ntasks in Y            1
 --- NOTE: sst_update is 0, setting io_form_auxinput4 = 0 and auxinput4_interval
  = 0 for all domains
 --- NOTE: grid_fdda is 0 for domain      1, setting gfdda interval and ending t
 ime to 0 for that domain.
 --- NOTE: both grid_sfdda and pxlsm_soil_nudge are 0 for domain      1, setting
  sgfdda interval and ending time to 0 for that domain.
 --- NOTE: obs_nudge_opt is 0 for domain      1, setting obs nudging interval an
 d ending time to 0 for that domain.
 --- NOTE: num_soil_layers has been set to      4
 REAL_EM V3.2.1 PREPROCESSOR
  *************************************
  Parent domain
  ids,ide,jds,jde            1          74           1          61
  ims,ime,jms,jme           -4          79          -4          66
  ips,ipe,jps,jpe            1          74           1          61
  *************************************
 DYNAMICS OPTION: Eulerian Mass Coordinate
    alloc_space_field: domain            1,    211001112 bytes allocated
Time period #   1 to process = 1989-01-01_00:00:00.
Total analysis times to input =    1.

 -----------------------------------------------------------------------------

 Domain  1: Current date being processed: 1989-01-01_00:00:00.0000, which is loop #   1 out of    1
 configflags%julyr, %julday, %gmt:        1989           1  0.0000000E+00
 metgrid input_wrf.F first_date_input = 1989-01-01_00:00:00
  metgrid input_wrf.F first_date_nml = 1989-01-01_00:00:00
 d01 1989-01-01_00:00:00 Timing for input          0 s.
 d01 1989-01-01_00:00:00          flag_soil_layers read from met_em file is  1
 Max map factor in domain 1 =  1.03. Scale the dt in the model accordingly.
 Converged znw(kte) should be about 0.0 =   1.9557774E-08
 i,j =           36           1
 target pressure and value =  NaN             0.0000000E+00
 column of pressure and value =    11.54298      0.0000000E+00
 column of pressure and value =    11.50575       1.304836
 column of pressure and value =    11.49841       1.304835
 column of pressure and value =    11.49218       1.304814
 column of pressure and value =    11.48373       1.304736
 column of pressure and value =    11.47274       1.304571
 column of pressure and value =    11.45896       1.304317
 column of pressure and value =    11.44215       1.304067
 column of pressure and value =    11.42211       1.303843
 column of pressure and value =    11.39869       1.303446
 column of pressure and value =    11.37174       1.302688
 column of pressure and value =    11.34110       1.302070
 column of pressure and value =    11.30667       1.301613
 column of pressure and value =    11.26832       1.301102
 column of pressure and value =    11.22595       1.300673
 column of pressure and value =    11.17944       1.300278
 column of pressure and value =    11.12869       1.299948
 column of pressure and value =    11.07359       1.299335
 column of pressure and value =    11.01405       1.298429
 column of pressure and value =    10.94995       1.297508
 column of pressure and value =    10.88121       1.296702
 column of pressure and value =    10.80772       1.296022
 column of pressure and value =    10.72938       1.295389
 column of pressure and value =    10.64609       1.294685
 column of pressure and value =    10.55775       1.293934
 column of pressure and value =    10.46423       1.293274
 column of pressure and value =    10.36541       1.292865
 column of pressure and value =    10.26107       1.292727
 column of pressure and value =    10.15094       1.292613
 column of pressure and value =    10.03458       1.292508
 column of pressure and value =    9.911253       1.292433
 column of pressure and value =    9.780256       1.292276
 column of pressure and value =    9.641078       1.292078
 column of pressure and value =    9.493196       1.292029
 column of pressure and value =    9.336086       1.292046
 column of pressure and value =    9.169236       1.292104
 column of pressure and value =    8.992136       1.292135
 column of pressure and value =    8.804224       1.292015
 column of pressure and value =    8.605637       1.291893
 column of pressure and value =    8.396945       1.291838
 column of pressure and value =    8.182659       1.291828
 column of pressure and value =    7.968373       1.291780
 column of pressure and value =    7.754087       1.291747
 column of pressure and value =    7.325516       1.291923
 column of pressure and value =    6.896945       1.292091
 column of pressure and value =    6.038575       1.292297
 column of pressure and value =    2.302585       1.294417
 -------------- FATAL CALLED ---------------
 FATAL CALLED FROM FILE:  <stdin>  LINE:    3717
 troubles, could not find trapping x locations
 -------------------------------------------
taskid: 0 hostname: tc214
taskid: 0 hostname: tc214
tomtomme
 
Posts: 7
Joined: Tue Nov 23, 2010 9:11 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby dcvz » Sat Mar 05, 2011 3:55 am

As I've mentioned before, there is no standard ECMWF output content, so users have to know what's in their file and modify the Vtable to match it. PSFC (134,1,0) is the preferred field. Some files only have PSFCH (134,109,1) which is PSFC at the lowest model level. Others only have LOGSFP (152,109,1).

For the interim data at NCAR there are 3 files for each time period needed to create the initial conditions: scalar and uv files (from either ml or pl) and the sfc file. (PSFC is in the sfc file). I've successfully created wrfinput from the era-interim ml files using the procedure outlined by darnold and the following Vtable:
Code: Select all
GRIB | Level| Level| Level| metgrid  |  metgrid | metgrid                                  |
Code | Code |   1  |   2  | Name     |  Units   | Description                              |
-----+------+------+------+----------+----------+------------------------------------------+
 130 | 109  |   *  |      | TT       | K        | Temperature                              |
 131 | 109  |   *  |      | UU       | m s-1    | U                                        |
 132 | 109  |   *  |      | VV       | m s-1    | V                                        |
 133 | 109  |   *  |      | SPECHUMD | kg kg-1  | Specific humidity                        |
 165 |  1   |   0  |      | UU       | m s-1    | U                                        | At 10 m
 166 |  1   |   0  |      | VV       | m s-1    | V                                        | At 10 m
 167 |  1   |   0  |      | TT       | K        | Temperature                              | At 2 m
 168 |  1   |   0  |      | DEWPT    | K        |                                          | At 2 m
     |  1   |   0  |      | RH       | %        | Relative Humidity at 2 m                 | At 2 m
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |
     |  1   |   0  |      | SOILHGT  | m        | Terrain field of source analysis         |
 134 |  1   |   0  |      | PSFC     | Pa       | Surface Pressure                         |
 151 |  1   |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |
 235 |  1   |   0  |      | SKINTEMP | K        | Sea-Surface Temperature                  |
  31 |  1   |   0  |      | XICE     | fraction | Sea-Ice-Fraction                         |
  34 |  1   |   0  |      | SST      | K        | Sea-Surface Temperature                  |
 141 |  1   |   0  |      | SNOW_EC  | m        |                                          |
     |  1   |   0  |      | SNOW     | kg m-2   |Water Equivalent of Accumulated Snow Depth|
 139 | 112  |   0  |   7  | ST000007 | K        | T of 0-7 cm ground layer                 |
 170 | 112  |   7  |  28  | ST007028 | K        | T of 7-28 cm ground layer                |
 183 | 112  |  28  | 100  | ST028100 | K        | T of 28-100 cm ground layer              |
 236 | 112  | 100  | 255  | ST100255 | K        | T of 100-255 cm ground layer             |
  39 | 112  |   0  |   7  | SM000007 | m3 m-3   | Soil moisture of 0-7 cm ground layer     |
  40 | 112  |   7  |  28  | SM007028 | m3 m-3   | Soil moisture of 7-28 cm ground layer    |
  41 | 112  |  28  | 100  | SM028100 | m3 m-3   | Soil moisture of 28-100 cm ground layer  |
  42 | 112  | 100  | 255  | SM100255 | m3 m-3   | Soil moisture of 100-255 cm ground layer |
-----+------+------+------+----------+----------+------------------------------------------+
#
#  In ECMWF hybrid-level files surface pressure can be at the surface or
#  hybrid level 1 or in LOGSFP.
#
#  Grib codes are from Table 128
#  http://www.ecmwf.int/services/archive/d/parameters/order=grib_parameter/table=128/

# snow depth is converted to the proper units in rrpr.F
# Land/sea fraction is converted to a flag (0/1) in rrpr.F


The 'unknown ksec2' error message means ungrib can't handle spherical harmonic coefficients. Converting LOGSFP to a grid format is only half the job. You also have to convert it to pressure in Pascals in rrpr.F and write it out as PSFC. Things would be much easier if the CERA guys would put PSFC (134,1,0) on their site.

The wrfinput files from the ml and pl interim output have significant differences. It's not clear what the cause is for the difference nor which one is more accurate.
dcvz
 
Posts: 185
Joined: Tue Apr 15, 2008 12:02 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby tomtomme » Tue Mar 08, 2011 10:09 am

Thank you for the hints!
A problem is, that from this comment in the Vtable
Code: Select all
#  In ECMWF hybrid-level files surface pressure can be at the surface or
#  hybrid level 1 or in LOGSFP.

it is not perfectly clear that one has to delete the lines of the pressure-parameters not given (but I agree that it should be the logical consequence...).

I´ve tried now with 152 LOGSFP only, but then real.exe won´t produce a wrfbdy-file and produces lot´s of "pressure-related" warnings, even though it ends with "succesful completition of real".
I´ve then tried to go for 134 PSFCH by converting LOGSFP to grid, then change the GRIB Code from 152 to 134, but the error remains:
Code: Select all
column of pressure and value =  -Infinity      NaN           
 -------------- FATAL CALLED ---------------
 FATAL CALLED FROM FILE:  <stdin>  LINE:    3717
 troubles, could not find trapping x locations
 -------------------------------------------


Maybe I misunderstand this:

The 'unknown ksec2' error message means ungrib can't handle spherical harmonic coefficients. Converting LOGSFP to a grid format is only half the job. You also have to convert it to pressure in Pascals in rrpr.F and write it out as PSFC.


Even after converting to grid via cdo the 'unknown ksec2' errors are still within the ungrib.log but ungrib.exe finishes.
What about this converting to pressure in rrpr.F then? That is done via exp to get rid of the LOG, isn´t it? And writing it out as PSFC is done via changing the grib-code - correct? Eitherway, both did not help.

I also tried 2 ways to get from spherical harmonics to grid:
Code: Select all
- sp2gp
Spectral to gridpoint
Convert all fields with spectral coefficients to a regular Gaussian grid. The number of
latitudes of the resulting Gaussian grid is calculated from the triangular truncation by:
nlat = N IN T ((trunc ∗ 3 + 1.)/2.)

- sp2gpl
Spectral to gridpoint (linear)
Convert all fields with spectral coefficients to a regular Gaussian grid. The number of
latitudes of the resulting Gaussian grid is calculated from the triangular truncation by:
nlat = N IN T ((trunc ∗ 2 + 1.)/2.)


At the end I even tried for PSFC (134,1,0) instead of PSFCH (134,109,1) but I had no way to change 109 to 1 what leaves memory protection fault running ungrib.

So now I´m again absolutely clueless what to try next. Thanks anyway.
I hope I can persuade the CERA guys to get PSFC (134,1,0)... they were quite reluctant to do it until now.
Yours sincerely, Thomas
tomtomme
 
Posts: 7
Joined: Tue Nov 23, 2010 9:11 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby AlexFr » Tue Jan 17, 2012 10:31 am

I know I kind of dig out this thread : I am sorry.

I try to use the ERA-Interim dataset in Model Level vertical coordinate. I think this type of data is better than pressure level since WPS realize a vertical interpolation (already interpolated in pressure level data set).
In that case I can process surface values without encountering any trouble.
But processing the atmospheric data I get the "famous" error ksec2(4) = 50. I understood it means that ungrib can't handle spherical harmonic coefficients.

The question is how to convert data from model level using spherical harmonic coefficients to data on model levels understandable by ungrib?
Using data on pressure levels is the only solution?

By the way if it matters I download my data in batch mode directly from the ecmwf data portal.

Alex

EDIT: I solve my problem. I just needed to change my MARS request to obtain T, U, V, Q on a gaussian grid.
AlexFr
 
Posts: 9
Joined: Tue Jan 17, 2012 10:09 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby antonio » Tue Feb 21, 2012 1:45 pm

Hello
I'm new to wrf.
I'm trying to use ERA-interim data with WRF.

I downloaded the file output.grid from http://data-portal.ecmwf.int/data/d/interim_full_daily/.
The data is in pressure levels.
I created the following links

GRIBFILE.AAA -> ~/weather_data/output.grib
Vtable.ECMWF_sigma -> ~/WPS/ungrib/Variable_Tables/Vtable.ECMWF_sigma
Vtable -> ~/WPS/ungrib/Variable_Tables/Vtable.ECMWF_sigma

but I got an error using WPS. ungrib.exe

*** Starting program ungrib.exe ***
Start_date = 2006-11-24_00:00:00 , End_date = 2006-11-25_00:00:00
output format is WPS
Path to intermediate files is ./
ungrib - grib edition num 1

###############################################################################

Inventory for date =

PRES TT UU VV SPECHUMD LOGSFP SOILGEO SOILHGT DEWPT RH LANDSEA PSFC PSFCH PMSL SKINTEMP SEAICE SST SNOW_EC SNOW ST000007 ST007028 ST028100 ST100255 SM000007 SM007028 SM028100 SM100255
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Begin rrpr
Subroutine DATINT: Interpolating 3-d files to fill in any missing data...
Looking for data at time 2006-11-24_00
ERROR: Data not found: 2006-11-24_00:00:00.0000

any suggestion would be appreciate
thanks

Antonio
antonio
 
Posts: 3
Joined: Tue Feb 21, 2012 12:14 pm

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby AlexFr » Thu Mar 01, 2012 5:43 am

Hi Antonio,

You use the wrong Vtable. Try with Vtable.ECMWF and it should be working fine.

Alex
AlexFr
 
Posts: 9
Joined: Tue Jan 17, 2012 10:09 am

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby antonio » Thu Mar 01, 2012 12:09 pm

Hi Alex, thanks.
I tried also to use Vtable.ECMWF.
but ungrib crashed

*** Starting program ungrib.exe ***
Start_date = 2006-11-24_00:00:00 , End_date = 2006-11-25_00:00:00
output format is WPS
Path to intermediate files is ./
ungrib - grib edition num 1
Unknown ksec2(4): 50

I done severale attempts:
1) changing with wgrib order at the variables like Scaine suggests.
2) write a new Vtable with the variables which appear in the output.grib

but doesn't work.
Are you using era-interim data in pressure levels?

thanks for the suggestion.

Antonio
antonio
 
Posts: 3
Joined: Tue Feb 21, 2012 12:14 pm

Re: Running WRF with ECMWF ERA-Interim Dataset

Postby AlexFr » Fri Mar 02, 2012 4:43 am

Hi,

I know this error quite well!
If you read the edit of my previous post, you will see that you need to extract the ECMWF data on a Gaussian grid for ungrib to work.
The Unknown ksec2(4): 50 error means that you extract value on a spherical harmonic grid.
I don't know how you download your ERA files but add
Code: Select all
"grid" = "160"
in your request namelist and everything should be just fine.

By the way, yes I use pressure level because and did not succeed in using model level (real.exe crashes).

Alex
AlexFr
 
Posts: 9
Joined: Tue Jan 17, 2012 10:09 am

PreviousNext

Return to Working with Various Datasets

Who is online

Users browsing this forum: No registered users and 5 guests