Working with CMIP5 data in WRF (2)

This post is a record on how to process the HadGEM2-CC data for WRF downscaling. Unlike GFDL-ESM2M, the atmospheric results in this dataset is on pressure levels, which saves a lot of trouble. But the data available on the portal are masked out with terrain, so some interpolation is required to avoid WRF errors during initialization (e.g. unreasonably large RH values for interpolation).

0. Preparation

0.1 Software prepration

We need a CDO with GRIB support. For instructions, check out my CDO installation post. The CDO I used here is the same as for GFDL-ESM2M case.

0.2 Vtable preparation

The Vtable is taken as in ref [1]. It looks like this (same as GFDL-ESM2M):

$ more Vtable.HadGEM2-CC
GRIB1| Level| From |  To  | metgrid  | metgrid  |   metgrid                                |
Param| Type |Level1|Level2| Name     | Units    | Description                              |
-----+------+------+------+----------+----------+------------------------------------------+
  11 | 100  |   *  |      | TT       | K        | Temperature                              |
  33 | 100  |   *  |      | UU       | m s-1    | U                                        |
  34 | 100  |   *  |      | VV       | m s-1    | V                                        |
  52 | 100  |   *  |      | SPECHUMD | kg kg-1  |                                          |
     | 100  |   *  |      | RH       | %        | Relative Humidity                        |
  11 | 105  |   2  |      | TT       | K        | Temperature                              | At 2 m
  52 | 105  |   2  |      | SPECHUMD | kg kg-1  |                                          | At 2 m
     | 105  |   2  |      | RH       | %        | Relative Humidity at 2 m                 | At 2 m
  33 | 105  |  10  |      | UU       | m s-1    | U                                        | At 10 m
  34 | 105  |  10  |      | VV       | m s-1    | V                                        | At 10 m
  81 |   1  |   0  |      | LANDSEA  |          | Land/Sea flag                            |
   1 |   1  |   0  |      | PSFC     | Pa       | Surface Pressure                         |
   2 | 102  |   0  |      | PMSL     | Pa       | Sea-level Pressure                       |
  11 |   1  |   0  |      | SKINTEMP | K        | Skin Temperature (and SST)               |
 144 | 112  |   0  |   5  | SM000010 | fraction | Soil Moist 0-8 cm below grn layer (Up)   |
 144 | 112  |   5  |  25  | SM010040 | fraction | Soil Moist 8-42 cm below grn layer       |
 144 | 112  |  25  | 100  | SM040100 | fraction | Soil Moist 42-98 cm below grn layer      |
 144 | 112  | 100  | 200  | SM100200 | fraction | Soil Moist 98-212 cm below grn layer     |
  11 | 112  |   0  |   5  | ST000010 | K        | T 0-8 cm below ground layer (Upper)      |
  11 | 112  |   5  |  25  | ST010040 | K        | T 8-42 cm below ground layer (Upper)     |
  11 | 112  |  25  | 100  | ST040100 | K        | T 42-98 cm below ground layer (Upper)    |
  11 | 112  | 100  | 200  | ST100200 | K        | T 98-222 cm below ground layer (Bottom)  |
-----+------+------+------+----------+----------+------------------------------------------+

 

1. Getting HadGEM2-CC data

In my case, I obtained my data from ESGF portal.  Note that on the ESGF portal, atmospheric data is also available on 6hr pressure levels, but those data contains too few pressure levels, so I decided to use the daily data that provides 8 pressure level results.

In summary, daily data is obtained for variables: hus, ta, ua, va, huss, tas, uas, vas, psl; monthly data is obtained for variables: mrlsl, ts, tsl, ps.

For this demo, I only used 1970 Jan-Apr data. This would make the testing case go faster, and consume less storage.

First I created 6 directories in the clipped_1970 directory (at this level I have clipped_1970, day, mon directories, where day stores downloaded daily files, mon stores monthly files):

mkdir step1.ready_for_grib step2.nc_to_grib step3.soil step4.adjust orig zaxis_tables

Then I created my test files by the following commands:

# 1. daily data
ncks -d time,30,120 day/hus_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/hus_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/huss_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/huss_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/psl_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/psl_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/ta_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/ta_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/tas_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/tas_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/ua_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/ua_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/uas_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/uas_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/va_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/va_HadGEM2-CC_orig.1970.nc
ncks -d time,30,120 day/vas_day_HadGEM2-CC_historical_r1i1p1_19691201-19741130.nc clipped_1970/orig/vas_HadGEM2-CC_orig.1970.nc

# 2. monthly data
ncks -d time,121,124 mon/mrlsl_Lmon_HadGEM2-CC_historical_r1i1p1_195912-198411.nc clipped_1970/orig/mrlsl_HadGEM2-CC_orig.1970.nc
ncks -d time,121,124 mon/ts_Amon_HadGEM2-CC_historical_r1i1p1_195912-198411.nc clipped_1970/orig/ts_HadGEM2-CC_orig.1970.nc
ncks -d time,121,124 mon/tsl_Lmon_HadGEM2-CC_historical_r1i1p1_195912-198411.nc clipped_1970/orig/tsl_HadGEM2-CC_orig.1970.nc
ncks -d time,121,124 mon/ps_Amon_HadGEM2-CC_historical_r1i1p1_195912-198411.nc clipped_1970/orig/ps_HadGEM2-CC_orig.1970.nc

 

2. File conversion (pressure level data)

Here I put the full commands I used (for every variable), so it would look a bit redundant.

2.1 Filling the missing values

The downloaded data contains missing in the regions where pressure levels are under terrain height, and this causes some trouble in WRF. To fill these regions, I employed a NCL script. Run the script in the orig directory.

 

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

 a = addfile("hus_HadGEM2-CC_orig.1970.nc","r")
 
 system("rm hus.filled.nc")
 
 lat = a->lat
 lat_bnds = a->lat_bnds
 lon = a->lon
 lon_bnds = a->lon_bnds
 time = a->time
 time_bnds = a->time_bnds
 plev = a->plev
 hus_unfilled = a->hus

 printVarSummary(hus_unfilled)

 hus_filled = hus_unfilled

 nscan = 2000 ; usually *much* fewer
 eps = 0.001 ; variable depended
 gtype = False ; "gendat" does not generate cyclic fields
 guess = 0 ; use zonal means
 relc = 0.6 ; standard relaxation coef
 opt = 0

 poisson_grid_fill(hus_filled, gtype, guess, nscan, eps, relc, opt)


 ncdf = addfile("hus.filled.nc","c")
 
 fAtt = True
 fAtt@title = "filled by xc"
 fAtt@creation_date = systemfunc("date")
 fileattdef(ncdf, fAtt)

 filedimdef(ncdf, "time", -1, True)
 ncdf->hus = hus_filled
 ncdf->lat = lat
 ncdf->lat_bnds = lat_bnds
 ncdf->lon = lon
 ncdf->lon_bnds = lon_bnds
 ncdf->time = time
 ncdf->time_bnds = time_bnds
 ncdf->plev = plev

Save this script as “fill_hus.ncl”, and run it using “ncl fill_hus.ncl”. You can easily mofity this script for ta, ua and va.

2.2 Adjust netCDF file format

Two things are required here (though the first may not be necessary depending on the CDO configuration). First is to remove the unnecessary variables (*_bnds), this may not be necessary depending on the CDO configuration. Second is to adjust the calendar format from “360_day” (i.e. 30 days for each month) to “standard calendar”.

# Step 1. remove unnecessary variables
ncatted -O -a bounds,,d,, orig/hus.filled.nc step1.ready_for_grib/hus.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/ta.filled.nc step1.ready_for_grib/ta.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/ua.filled.nc step1.ready_for_grib/ua.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/va.filled.nc step1.ready_for_grib/va.temp1.1970.nc

cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/hus.temp1.1970.nc step1.ready_for_grib/hus.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/ta.temp1.1970.nc step1.ready_for_grib/ta.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/ua.temp1.1970.nc step1.ready_for_grib/ua.temp2.1970.nc 
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/va.temp1.1970.nc step1.ready_for_grib/va.temp2.1970.nc

# Step 2. adjust calendar
cdo setreftime,1859-12-01,0,1s -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/hus.temp2.1970.nc step1.ready_for_grib/hus.temp3.1970.nc
cdo setreftime,1859-12-01,0,1s -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/ta.temp2.1970.nc step1.ready_for_grib/ta.temp3.1970.nc
cdo setreftime,1859-12-01,0,1s -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/ua.temp2.1970.nc step1.ready_for_grib/ua.temp3.1970.nc
cdo setreftime,1859-12-01,0,1s -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/va.temp2.1970.nc step1.ready_for_grib/va.temp3.1970.nc

2.3 Interpolate to get more pressure levels

This step depends on the specific demands. You may not want to use this many levels:

export EXTRAPOLATE=1
cdo intlevel,100000,97500,95000,92500,90000,87500,85000,82500,80000,77500,75000,70000,65000,60000,55000,50000,45000,40000,35000,30000,25000,22500,20000,17500,15000,12500,10000,7000,5000,3000 step1.ready_for_grib/hus.temp3.1970.nc step1.ready_for_grib/hus.temp4.1970.nc
cdo intlevel,100000,97500,95000,92500,90000,87500,85000,82500,80000,77500,75000,70000,65000,60000,55000,50000,45000,40000,35000,30000,25000,22500,20000,17500,15000,12500,10000,7000,5000,3000 step1.ready_for_grib/ta.temp3.1970.nc step1.ready_for_grib/ta.temp4.1970.nc
cdo intlevel,100000,97500,95000,92500,90000,87500,85000,82500,80000,77500,75000,70000,65000,60000,55000,50000,45000,40000,35000,30000,25000,22500,20000,17500,15000,12500,10000,7000,5000,3000 step1.ready_for_grib/ua.temp3.1970.nc step1.ready_for_grib/ua.temp4.1970.nc
cdo intlevel,100000,97500,95000,92500,90000,87500,85000,82500,80000,77500,75000,70000,65000,60000,55000,50000,45000,40000,35000,30000,25000,22500,20000,17500,15000,12500,10000,7000,5000,3000 step1.ready_for_grib/va.temp3.1970.nc step1.ready_for_grib/va.temp4.1970.nc

# Then use the python script to change plev value to 0.001* 
HadGEM2-CC.modify_lev_value.py hus
HadGEM2-CC.modify_lev_value.py ta
HadGEM2-CC.modify_lev_value.py ua
HadGEM2-CC.modify_lev_value.py va

The python script adjusts the pressure levels to fit the strange unit conversion in CDO (where Pa is automatically treated as hPa). Double check if you need this step on your machine. Here is the contend in the above python script:

 
#!/usr/bin/env python

import numpy as np
import netCDF4 as nc
import sys

var = sys.argv[1]

infile = 'step1.ready_for_grib/'+var+'.temp4.1970.nc'
rootgroup = nc.Dataset(infile, 'a', format='NETCDF4')
lev_var = rootgroup.variables['plev']
lev_value_orig = lev_var[:]
lev_var[:] = lev_value_orig*0.01
rootgroup.close()

Then convert the files to grib format.

cdo -f grb setltype,100 -chparam,-1,52 step1.ready_for_grib/hus.temp4.1970.nc step2.nc_to_grib/hus_Plev.daily.grb
cdo -f grb setltype,100 -chparam,-1,11 step1.ready_for_grib/ta.temp4.1970.nc step2.nc_to_grib/ta_Plev.daily.grb
cdo -f grb setltype,100 -chparam,-1,33 step1.ready_for_grib/ua.temp4.1970.nc step2.nc_to_grib/ua_Plev.daily.grb
cdo -f grb setltype,100 -chparam,-1,34 step1.ready_for_grib/va.temp4.1970.nc step2.nc_to_grib/va_Plev.daily.grb

 

3. File conversion (surface pressure data)

ncatted -O -a bounds,,d,, orig/ps_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/ps.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/psl_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/psl.temp1.1970.nc

cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/ps.temp1.1970.nc step1.ready_for_grib/ps.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/psl.temp1.1970.nc step1.ready_for_grib/psl.temp2.1970.nc

cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-16,0,1month -setcalendar,standard step1.ready_for_grib/ps.temp2.1970.nc step1.ready_for_grib/ps.temp3.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/psl.temp2.1970.nc step1.ready_for_grib/psl.temp3.1970.nc

cdo -f grb setltype,1 -chparam,-1,1 step1.ready_for_grib/ps.temp3.1970.nc step2.nc_to_grib/ps.monthly.grb
cdo -f grb setltype,102 -chparam,-1,2 step1.ready_for_grib/psl.temp3.1970.nc step2.nc_to_grib/psl.daily.grb

 

4. File conversion (near surface data)

ncatted -O -a bounds,,d,, orig/huss_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/huss.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/tas_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/tas.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/uas_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/uas.temp1.1970.nc
ncatted -O -a bounds,,d,, orig/vas_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/vas.temp1.1970.nc

cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/huss.temp1.1970.nc step1.ready_for_grib/huss.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/tas.temp1.1970.nc step1.ready_for_grib/tas.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/uas.temp1.1970.nc step1.ready_for_grib/uas.temp2.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/vas.temp1.1970.nc step1.ready_for_grib/vas.temp2.1970.nc

cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/huss.temp2.1970.nc step1.ready_for_grib/huss.temp3.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/tas.temp2.1970.nc step1.ready_for_grib/tas.temp3.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/uas.temp2.1970.nc step1.ready_for_grib/uas.temp3.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-01,12:00:00,1day -setcalendar,standard step1.ready_for_grib/vas.temp2.1970.nc step1.ready_for_grib/vas.temp3.1970.nc

cdo -f grb setzaxis,zaxis_tables/zaxisinvert_surf2 -setltype,105 -chparam,-1,52 step1.ready_for_grib/huss.temp3.1970.nc step2.nc_to_grib/huss.daily.grb
cdo -f grb setzaxis,zaxis_tables/zaxisinvert_surf2 -setltype,105 -chparam,-1,11 step1.ready_for_grib/tas.temp3.1970.nc step2.nc_to_grib/tas.daily.grb
cdo -f grb setzaxis,zaxis_tables/zaxisinvert_surf10 -setltype,105 -chparam,-1,33 step1.ready_for_grib/uas.temp3.1970.nc step2.nc_to_grib/uas.daily.grb
cdo -f grb setzaxis,zaxis_tables/zaxisinvert_surf10 -setltype,105 -chparam,-1,34 step1.ready_for_grib/vas.temp3.1970.nc step2.nc_to_grib/vas.daily.grb

 

5. File conversion (skin temperature)

HadGEM2-CC data provides ts variable, and according to its explanation, ts is SST over the ocean.

ncatted -O -a bounds,,d,, orig/ts_HadGEM2-CC_orig.1970.nc step1.ready_for_grib/ts.temp1.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds step1.ready_for_grib/ts.temp1.1970.nc step1.ready_for_grib/ts.temp2.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-16,0,1month -setcalendar,standard step1.ready_for_grib/ts.temp2.1970.nc step1.ready_for_grib/ts.temp3.1970.nc
cdo -f grb -setltype,1 -chparam,-1,11 step1.ready_for_grib/ts.temp3.1970.nc step2.nc_to_grib/ts.monthly.grb

 

6. soil data

6.1 soil temperature

ncatted -O -a bounds,,d,, orig/tsl_HadGEM2-CC_orig.1970.nc step3.soil/tsl.temp1.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds,depth_bnds step3.soil/tsl.temp1.1970.nc step3.soil/tsl.temp2.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-16,0,1month -setcalendar,standard step3.soil/tsl.temp2.1970.nc step3.soil/tsl.temp3.1970.nc
cdo splitlevel step3.soil/tsl.temp3.1970.nc step3.soil/soilt

cdo -f grb setzaxis,zaxis_tables/zaxis0_5 -setltype,112 -chparam,-1,11 step3.soil/soilt000.05.nc step2.nc_to_grib/soilt01.grb
cdo -f grb setzaxis,zaxis_tables/zaxis5_25 -setltype,112 -chparam,-1,11 step3.soil/soilt00.225.nc step2.nc_to_grib/soilt02.grb
cdo -f grb setzaxis,zaxis_tables/zaxis25_100 -setltype,112 -chparam,-1,11 step3.soil/soilt00.675.nc step2.nc_to_grib/soilt03.grb
cdo -f grb setzaxis,zaxis_tables/zaxis100_200 -setltype,112 -chparam,-1,11 step3.soil/soilt000002.nc step2.nc_to_grib/soilt04.grb

Here is what the zaxis files look like (showing only one file, others are similar, just adjust the depth value):

$ more zaxis_tables/zaxis0_5
zaxistype = depth_below_land
size      = 1
name      = depth
longname  = depth_below_land
units     = cm
lbounds   = 0
ubounds   = 5

6.2 soil moisture

ncatted -O -a bounds,,d,, orig/mrlsl_HadGEM2-CC_orig.1970.nc step3.soil/mrlsl.temp1.1970.nc
cdo delname,lat_bnds,lon_bnds,time_bnds,depth_bnds step3.soil/mrlsl.temp1.1970.nc step3.soil/mrlsl.temp2.1970.nc
cdo setreftime,1859-12-01,0,1day -settaxis,1970-01-16,0,1month -setcalendar,standard step3.soil/mrlsl.temp2.1970.nc step3.soil/mrlsl.temp3.1970.nc
cdo splitlevel step3.soil/mrlsl.temp3.1970.nc step3.soil/soilm

cdo -f grb setzaxis,zaxis_tables/zaxis0_5 -setltype,112 -chparam,-1,144 step3.soil/soilm000.05.nc step2.nc_to_grib/soilm01.grb
cdo -f grb setzaxis,zaxis_tables/zaxis5_25 -setltype,112 -chparam,-1,144 step3.soil/soilm00.225.nc step2.nc_to_grib/soilm02.grb
cdo -f grb setzaxis,zaxis_tables/zaxis25_100 -setltype,112 -chparam,-1,144 step3.soil/soilm00.675.nc step2.nc_to_grib/soilm03.grb
cdo -f grb setzaxis,zaxis_tables/zaxis100_200 -setltype,112 -chparam,-1,144 step3.soil/soilm000002.nc step2.nc_to_grib/soilm04.grb

cdo mulc,0.02 step2.nc_to_grib/soilm01.grb step2.nc_to_grib/soilm01_frac.grb
cdo mulc,0.005 step2.nc_to_grib/soilm02.grb step2.nc_to_grib/soilm02_frac.grb
cdo mulc,0.0013 step2.nc_to_grib/soilm03.grb step2.nc_to_grib/soilm03_frac.grb
cdo mulc,0.001 step2.nc_to_grib/soilm04.grb step2.nc_to_grib/soilm04_frac.grb

rm step2.nc_to_grib/soilm01.grb step2.nc_to_grib/soilm02.grb step2.nc_to_grib/soilm03.grb step2.nc_to_grib/soilm04.grb

 

7. Final steps

To be honest, I am not sure what step is for. But when I plug the files available so far at step2.nc_to_grib directory to WPS, the output met_em files are not correctly showing the variables. With the following operations, however, they work all right. If you find that your WPS is able to use the files we obtain so far, this step is unnecessary.

cdo mulc,1.0 step2.nc_to_grib/hus_Plev.daily.grb step4.adjust/hus_Plev.daily.grb
cdo mulc,1.0 step2.nc_to_grib/ta_Plev.daily.grb step4.adjust/ta_Plev.daily.grb
cdo mulc,1.0 step2.nc_to_grib/ua_Plev.daily.grb step4.adjust/ua_Plev.daily.grb
cdo mulc,1.0 step2.nc_to_grib/va_Plev.daily.grb step4.adjust/va_Plev.daily.grb

cdo mulc,1.0 step2.nc_to_grib/huss.daily.grb step4.adjust/huss.daily.grb
cdo mulc,1.0 step2.nc_to_grib/tas.daily.grb step4.adjust/tas.daily.grb
cdo mulc,1.0 step2.nc_to_grib/uas.daily.grb step4.adjust/uas.daily.grb
cdo mulc,1.0 step2.nc_to_grib/vas.daily.grb step4.adjust/vas.daily.grb

cdo mulc,1.0 step2.nc_to_grib/psl.daily.grb step4.adjust/psl.daily.grb
cdo mulc,1.0 step2.nc_to_grib/ps.monthly.grb step4.adjust/ps.monthly.grb
cdo mulc,1.0 step2.nc_to_grib/ts.monthly.grb step4.adjust/ts.monthly.grb

cdo mulc,1.0 step2.nc_to_grib/soilm01_frac.grb step4.adjust/soilm01_frac.grb
cdo mulc,1.0 step2.nc_to_grib/soilm02_frac.grb step4.adjust/soilm02_frac.grb
cdo mulc,1.0 step2.nc_to_grib/soilm03_frac.grb step4.adjust/soilm03_frac.grb
cdo mulc,1.0 step2.nc_to_grib/soilm04_frac.grb step4.adjust/soilm04_frac.grb
cdo mulc,1.0 step2.nc_to_grib/soilt01.grb step4.adjust/soilt01.grb
cdo mulc,1.0 step2.nc_to_grib/soilt02.grb step4.adjust/soilt02.grb
cdo mulc,1.0 step2.nc_to_grib/soilt03.grb step4.adjust/soilt03.grb
cdo mulc,1.0 step2.nc_to_grib/soilt04.grb step4.adjust/soilt04.grb

Now the files in step4.adjust directory can be plugged to WPS and generate the met_em files as we want. Once WPS and WRF is working correctly, we can safely delete all the intermediate files produced above.

With GFDL-ESM2M and HadGEM2-CC done, I guess the other model results can be digested in a similar way. I expect no big issues there, and given the types of output (such as masked data, or hybrid level data) a combination of the steps in this post and the part (1) post should be sufficient.

Remarks:

  1. For my runs I used the landmask in the WPS default database. As you can see my Vtable.HadGEM2-CC actually has a line for landmask, but I did not prepare it. So far it looks I do not have any problem, but this may be something you want to improve.

 

References

[1] CORDEX experiment instruction.

[2] NCL poission_grid_fill function.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s