Scripts for regridding ERA5-Land and IMERG precip

12 views
Skip to first unread message

Yongxin Zhang

unread,
Dec 15, 2025, 12:40:14 PMDec 15
to wrf-hydro_users, Liang Zhang, Fructueux EHOUINSOU, Juan Carlos Tufino, Rwasoka D.T.
Hi Fructueux Ehouinsou, Juan Carlos Tufino, Liang, Donald, 

     Please find the ERA5LAND.tar file linked to the Google Doc that contains the scripts for creating the LDASIN files based on the ERA5-Land data. In this tar file, you will find the following files and scripts:

1) era5land_199801.nc and era5land_199802.nc: The input ERA5-Land files that Fructueux sent to me originally. I used  era5land_199801.nc to create the LDASIN files.
2) create_weight_file.csh: The C-shell script for creating the weight file used in regridding. The C-shell script calls the NCL script "ESMF_creating_weight_ERA5LAND2WRFHYDRO.ncl" that actually creates the weight file "ERA5LAND_to_WRFHYDRO_weight_bilinear.nc". The weight file is only needed to be created once.
3) create_LDASIN_files.csh: The C-shell script for creating the LDASIN files using the weight file and the input ERA5-Land file. This C-shell script calls the NCL script "ESMF_creating_LDASIN_ERA5LAND2WRFHYDRO.ncl" that actually does the regridding. The LDASIN files are needed to be created at an hourly frequency.
4) 199801????.LDASIN_DOMAIN1 files: The hourly LDASIN files that have been created. All 8 forcing variables are in each of the LDASIN files.

   The LDASIN files are simply regridded from the input ERA5-Land data without applying any downscaling (i.e., accounting for difference in terrain height between the input file and the WRF-Hydro domain). Downscaling can be applied to temperature using standard lapse rate or spatially distributed lapse rates if you have and in that case the ERA5-Land terrain data need to be provided. Once temperature is updated after applying downscaling, surface pressure and then humidity can be updated using the updated temperature. For shortwave radiation, we can use a WRF routine to account for terrain effects.

There is no good way of downscaling wind and precip since they change not only with height but also with the shape and character of the terrain as well as with the atmospheric circulations. Also, there is no good way of downscaling longwave radiation either.

Fructueux Ehouinsou, Juan Carlos Tufino,

   In your era5land_199801.nc file, the downward shortwave radiation (ssrd) and longwave radiation (strd) are specified as accumulated quantities with the unit of J m**-2. The LDASIN files need the unit to be W m**-2 and normally if we divide J m**-2 by the duration of period in seconds the unit will become W m**-2. I thought that the duration of period in your file is 1 hour or 3600 seconds but after I used 3600 seconds I noticed that the shortwave radiation and longwave radiation values are not correct (they are too big). In the tar file, I still used 3600 seconds but please figure out the real duration of the period and compute the correct downward longwave and shortwave radiation.

     Also, In your era5land_199801.nc file, there are missing values along the southeast edge of the domain. The LDASIN files should not contain any missing values so I used some plausible values to replace the missing values. You can change the values to values that you like in ESMF_creating_LDASIN_ERA5LAND2WRFHYDRO.ncl.

Liang,

   Somehow I was not able to read or view any of your ERA5LAND_20????.grib files using NCL. I also could not convert any of your grib files to netCDF files. You will need to double check your files. Then you can use the scripts in the tar files to create the LDASIN files for your domain.


Fructueux Ehouinsou, Juan Carlos Tufino,

      Also please find the IMERG.tar file linked to the Google Doc that contains the scripts for creating the supplemental precip files based on the IMERG data. In this tar file, you will find the major script, create_weight_regridding.csh, that creates the weight file for each IMERG file and then regrids the IMERG data to your domain. The reason for creating the weight file for each IMERG file is that the number and locations of the missing values in each IMERG file are different so each IMERG file needs to have its own weight file. This script calls the NCL script, ESMF_weight_regridding_IMERG2WRFHydro.ncl. 

   The 1998*.PRECIP_FORCING.nc files are the created supplemental precip files. Once you use the correct forcing type in the namelist.hrldas file (e.g., FORC_TYP = 6 in this case), the IMERG precip will replace the EAR5-Land precip. I checked these 1998*.PRECIP_FORCING.nc files and I noticed that many files show only zero precip over the entire domain. To make sure that my scripts are correct, I used your IMERG files in our California domain and Colorado domain and I saw the right magnitude and location of precip in these domains.

    Please let me know if you have any questions.

Thanks,
Yongxin


Yongxin Zhang

unread,
Dec 16, 2025, 11:22:01 AMDec 16
to Fructueux EHOUINSOU, wrf-hydro_users
Hi Fructueux EHOUINSOU,

       Thank you very much for your kind words! No, that should not be a problem since the supplemental precip files need to be named as 
YYYYMMDDHHMM.PRECIP_FORCING.nc and the variable inside the files needs to be either "precip" with a unit of "mm" or "precip_rate" with a unit of "mm/s". I used "precip". When you run the WRF-Hydro model, the LDASIN files and precip supplemental files need to be in the same directory.

        I forgot to mention in my previous email that for regridding I tried both "conserve" and "bilinear" methods and they produced similar results though precip looked more smoother using "bilinear" than using "conserve". I would recommend the "conserve" regridding method for precip since it would conserve the IMERG precip. For the LDASIN files, I used "bilinear" for all variables for convenience.

Thanks,
Yongxin

On Tue, Dec 16, 2025 at 2:45 AM Fructueux EHOUINSOU <ehouinsou...@gmail.com> wrote:

Hello Yongxin Zhang,

I hope you are well. I have received your work. Thank you for your dedication. My first comment is about FORCING, which is .nc instead of .LDASIN. Is this a problem?

Thanks, 

Reply all
Reply to author
Forward
0 new messages