Project

General

Profile

How to mask ERA5 data

Added by AKHIL VARGHESE 3 months ago

Hi,
I have ERA5 data of UV wind, I need to mask the land area to work with the ocean wind.

How can I mask the land area, somebody please help me

Screenshot from 2024-01-29 23-39-18.png (17.9 KB) Screenshot from 2024-01-29 23-39-18.png Screen Shot of the details of the data file. the data is too huge. I think in this the k=2 is some errors and there is no values in k=2

Replies (3)

RE: How to mask ERA5 data - Added by AKHIL VARGHESE 3 months ago

Actually I tried these codes, it is for a 1*1 grid so that I adjusted the code accordingly for my 0.25*0.25 degree data. But it doesn't work when I try to plot the final data it shows there is no data to plot. How can i resolve this

Also tried this code. Which is perfectly worked for my previous data from CMEMS

cdo -f nc setctomiss,0 -gtc,0 -remapcon,your_data_file.nc -topo seamask.nc

cdo mul your_data_file.nc seamask.nc masked_datafile.nc
Is this is a problem related to data.

RE: How to mask ERA5 data - Added by Karin Meier-Fleischer 3 months ago

Generate a land mask file of the same grid as input ERA5 data.

Assuming that the u- and v-data are stored in separate files u_131.grb and v_132.grb.

1. Retrieve the grid description of the ERA5 uv data

cdo griddes u_131.grb > grid_u.txt

2. Generate the appropriate land mask

cdo -lec,0.0 -setrtomiss,0,10000 -remapnn,grid_u.txt -topo mask_land.grb

3. mask the ERA5 uv data

cdo -mul mask_land.grb u_131.grb u_131_ocean.grb
cdo -mul mask_land.grb v_132.grb v_132_ocean.grb
    (1-3/3)