感謝Dawn的建議,蘭溪之水的WRF教程
參考了一些經驗,並結合實際后,成功用ERA5驅動WRF。實際上,用ERA5數據驅動WRF的方法和用ERA-Interim 數據驅動WRF極其類似。
總結幾點是,下載的變量要全,水平范圍要覆蓋,垂直層次設置要匹配
1 需要下載的變量
參考http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Basics/UNGRIB/ungrib_req_fields.php
三維場:
'geopotential','relative_humidity','specific_humidity','temperature','u_component_of_wind','v_component_of_wind'
表面場:
'surface_pressure','mean_sea_level_pressure','10m_u_component_of_wind','10m_v_component_of_wind','2m_temperature','sea_surface_temperature','skin_temperature','2m_dewpoint_temperature','snow_depth','sea_ice_cover','land_sea_mask','soil_type','soil_temperature_level_1','soil_temperature_level_2','soil_temperature_level_3','soil_temperature_level_4','volumetric_soil_water_layer_1','volumetric_soil_water_layer_2','volumetric_soil_water_layer_3','volumetric_soil_water_layer_4'
經過本人測試,ERA-Interim.pl的Vtable可直接使用。
關於ERA5的地形和高度
https://confluence.ecmwf.int/display/CKB/ERA5%3A+surface+elevation+and+orography
2 變量場的水平范圍大小
下載的變量場的水平范圍要大於模擬區域的水平范圍。以下報錯均和變量場的水平范圍太小有關:
metgrid.exe時候,報錯,可能是驅動的物理量場范圍太小。
FILE WARNING: Field PRES has missing values at level 200100 at (i,j)=(1,411) WARNING: Field GHT has missing values at level 200100 at (i,j)=(1,411) WARNING: Field PMSL has missing values at level 200100 at (i,j)=(1,411) WARNING: Field PSFC has missing values at level 200100 at (i,j)=(1,411) WARNING: Field SOILHGT has missing values at level 200100 at (i,j)=(1,411) ERROR: Missing values encountered in interpolated fields. Stopping. Abort(53732176) on node 0 (rank 0 in comm 0): application called MPI_
參考wrfforum的意見(原網址忘了),下載的地面層使用的是全球區域的網格,能夠通過了metgrid。(高空沒有用全球網格) (這個論壇有類似問題,http://bbs.06climate.com/forum.php?mod=viewthread&tid=30928)
又一坑!metgrid過了,real又沒過,翻遍搜索引擎,還是古狗好用:P
國外有大神早就發現了這個問題:http://www.iup.uni-bremen.de/~hilboll/blog/2018/12/wrf-errors-could-not-find-trapping-x-locations/
更新一下,之前下載的高空數據范圍太小。和Dawn討論了一下,下載的數據范圍要稍微大一些,重新下載了地面和高空數據,能通過編譯了。保險起見,下載變量場的水平范圍,東西和南北方向上至少再擴10度以上。
3 垂直層次設置的匹配
就是輸入數據的垂直層次和namelist的層次設置(num_metgrid_levels)要匹配,
另一個坑 Mismatch between namelist and input file dimensions
WRFDomainwizard里面連接ECMWF的Vtable之后,在namelist.wps生成了model_level pres的字段,將其注釋掉,否則會在后面出現報錯 d01 2018-06-07_00:00:00 ---- ERROR: Mismatch between namelist and input file dimensions
不對!是把這個字段進行更改!num_metgrid_levels改成輸入數據的層次(即輸入氣壓層的層數)
關於 &mod_levs,參考了WRF_User_Guide相關章節
B. mod_levs.exe
The mod_levs.exe program is used to remove levels of data from intermediate format files. The levels which are to be kept are specified in a new namelist record in the namelist.wps file:&mod_levs press_pa = 201300 , 200100 , 100000 , 95000 , 90000 , 85000 , 80000 , 75000 , 70000 , 65000 , 60000 , 55000 , 50000 , 45000 , 40000 , 35000 , 30000 , 25000 , 20000 , 15000 , 10000 , 5000 , 1000 /Within thenamelist record, the variable press_pa is used to specify a list of levels to keep; the specified levels should match values of xlvl in the intermediate format files (see the discussion of the WPS intermediate format for more information on the fields of the intermediate files). The mod_levs program takes two command-line arguments as its input. The first argument is the name of the intermediate file to operate on, and the second argument is the name of the output file to be written.
Removing all but a specified subset of levels from meteorological data sets is particularly useful, for example, when one data set is to be used for the model initial conditions and a second data set is to be used for the lateral boundary conditions. This can be done by providing the initial conditions data set at the first time period to be interpolated by metgrid, and the boundary conditions data set for all other times. If the both data sets have the same number of vertical levels, then no work needs to be done; however, when these two data sets have a different number of levels, it will be necessary, at a minimum,
to remove (m – n) levels, where m > n and m and n are the number of levels in each of the two data sets, from the data set with m levels. The necessity of having the same number of vertical levels in all files is due to a limitation in real.exe, which requires a constant number of vertical levels to interpolate from.The mod_levs utility is something of a temporary solution to the problem of accommodating two or more data sets with differing numbers of vertical levels. Should a user choose to use mod_levs, it should be noted that, although the vertical locations of the levels need not match between data sets, all data sets should have a surface level of data, and, when running real.exe and wrf.exe, the value of p_top must be chosen to be below the lowest top among the data sets.
翻譯:
在 &mod_levs 字段 中,變量press_pa用於指定要保留的層次列表;指定的級別應與中間格式文件中xlvl的值匹配(有關中間文件記錄的詳細信息,請參閱對WPS中間格式的討論)。mod_levs程序接受兩個命令行參數作為輸入。第一個參數是要操作的中間文件的名稱,第二個參數是要寫入的輸出文件的名稱。
從氣象數據集中刪除(指定的層次外的所有層次)特別有用,例如,當一個數據集用於模型初始條件,而第二個數據集用於橫向邊界條件時。這可以通過提供由metgrid插值的第一時間段的初始條件數據集和所有其他時間的邊界條件數據集來實現。如果兩個數據集具有相同數量的垂直層次,則無需執行任何工作;但是,當這兩個數據集具有不同數量的層次時,至少需要執行以下操作:
要刪除(m–n)層次,其中m>n和m和n是兩個數據集中每一個數據集中具有m個層次的數據集中的層次數。所有文件中必須具有相同數量的垂直層次,這是由於real.exe中的一個限制,該限制要求從中插入的垂直層次數量恆定。
mod_levs實用程序是解決容納兩個或多個具有不同垂直層次數目的數據集問題的臨時解決方案。如果用戶選擇使用mod_levs,則應注意,雖然層次的垂直位置不需要在數據集之間匹配,但所有數據集都應具有數據的表面層次,並且,在運行real.exe和wrf.exe時,必須選擇p_top的值低於數據集中的最低的頂層。
參考網站
https://dreambooker.site/2019/10/03/Initializing-the-WRF-model-with-ERA5-pressure-level/
http://bbs.06climate.com/forum.php?mod=viewthread&tid=30962&highlight=ECMWF