Remap from 0.25*0.25 to 0.5*0.5 for grid area
Added by Sam United over 7 years ago
Hi Friends,
I have a problem with the choosing methods of remap from resolution of 0.25*0.25 to 0.5*0.5 degree, my variable is grid area. I also attached the input nc file.
Cheers
Sam
GFED_grid_025.nc (3.97 MB) GFED_grid_025.nc |
Replies (12)
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
there is only one variable called GFED4.1s_1997.hdf5
- is it the right file?
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Sam United over 7 years ago
yes, it is right, it is the grid area in each lat/lon
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
IMO it sounds awkward to interpolate the area of each grid cell to another resolution, because it's wrong in the new grid. for regular grids, CDO can compute them internally. If I would do, I'd take conservative rempping.
uploaded are conservative (con), bilinera (bil) and distance weighted fields
commands
cdo -P 8 remapcon,global_0.5 GFED_grid_025.nc GFED_grid_050_con.nc cdo -P 8 remapbil,global_0.5 GFED_grid_025.nc GFED_grid_050_bil.nc cdo -P 8 remapdis,global_0.5 GFED_grid_025.nc GFED_grid_050_dis.nc
hth
ralf
GFED_grid_050_bil.nc (1020 KB) GFED_grid_050_bil.nc | |||
GFED_grid_050_dis.nc (1020 KB) GFED_grid_050_dis.nc | |||
GFED_grid_050_con.nc (1020 KB) GFED_grid_050_con.nc |
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Sam United over 7 years ago
Hi Ralf,
Thank you. I found the results are not what I expect, I decide touse 'cdo gridboxsum,2,2' to do that.
Cheers
Sam
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
gridboxsum
will get results more closer to the real area. Note, that cdo also has a gridarea operator, that can compute it. You can change the earth radius for the internal computation by setting the environment variable PLANET_RADIUS
(default 6371000.0)
hth
ralf
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Sam United over 7 years ago
When I use gridarea, it works better, but I want to change the earth radius to 55000, how can I set the environment variable PLANET_RADIUS. I mean what is the function like?
Cheers
Sam
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
depends on your shell
- csh/tcsh: setenv PLANET_RADIUS 55000
- sh/bash/zsh: export PLANET_RADIUS=55000
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
in case you dont know how to find that out, run
echo $SHELL
or do you run MacOS or Windows?
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Sam United over 7 years ago
I use Unix in server
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
if you can call setenv without problems, its a csh-compliant shell. Use export otherwise
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Sam United over 7 years ago
Hi Ralf,
export PLANET_RADIUS works for me. Thank you for your kind help.
Cheers
Sam
RE: Remap from 0.25*0.25 to 0.5*0.5 for grid area - Added by Ralf Mueller over 7 years ago
you're welcome - have a nice weekend!