calculate the grid file to be used for remapbil
Added by Enrico Gabrielli over 1 year ago
I have to reproject the data from Climate Projections RCP4.5 and RCP 8.5 downscaled @2.2 km over Italy (https://dds.cmcc.it/#/dataset/climate-projections-rcp85-downscaled-over-italy) into R for a small area of 4 pixels.
netcdf has these features for the grid:
float lon[rlon,rlat] (Contiguous storage)
_FillValue: NaN
standard_name: longitude
long_name: longitude
_CoordinateAxisType: Lon
units: degrees_east
8 byte int crs_rotated_latitude_longitude[] (Contiguous storage)
grid_north_pole_latitude: 47
grid_north_pole_longitude: -168
grid_mapping_name: rotated_latitude_longitude
float lat[rlon,rlat] (Contiguous storage)
_FillValue: NaN
standard_name: latitude
long_name: latitude
_CoordinateAxisType: Lat
units: degrees_north
rlat Size:2
standard_name: grid_latitude
long_name: rotated latitude
axis: Y
units: degrees
rlon Size:2
standard_name: grid_longitude
long_name: rotated longitude
axis: X
units: degrees
To transform EPSG:4326 back into latlon EPSG:4326 with rmapbil, how should I construct the grid.txt?
Below is that right?
gridtype = lonlat
xsize = 2
ysize = 2
xfirst = -168
xinc = 0.034
yfirst = 47
yinc = 0.020
I'm not sure about xinc and yinc
Thank you
Replies (1)
RE: calculate the grid file to be used for remapbil - Added by Enrico Gabrielli over 1 year ago
cdo griddes '/home/bonushenricus/Documenti/lavoro/dati/cosmos/VHR-PRO_IT2km_CMCC-CM_rcp85_CCLM5-0-9_1hr_315704_villa_masini.nc' #
- gridID 1 #
gridtype = curvilinear
gridsize = 4
datatype = float
xsize = 2
ysize = 2
xname = lon
xdimname = rlon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ydimname = rlat
ylongname = "latitude"
yunits = "degrees_north"
xvals = 12.12109 12.14901 12.12113 12.14906
yvals = 44.25236 44.25233 44.27236 44.27233
scanningMode = 0
gridtype = projection
gridsize = 4
xsize = 2
ysize = 2
xname = rlon
xlongname = "rotated longitude"
xunits = "degrees"
yname = rlat
ylongname = "rotated latitude"
yunits = "degrees"
xfirst = 0.0867550000548363
xinc = 0.0200000032782555
yfirst = 1.25242495536804
yinc = 0.0200001001358032
scanningMode = 0
grid_mapping = crs_rotated_latitude_longitude
grid_mapping_name = rotated_latitude_longitude
grid_north_pole_latitude = 47.
grid_north_pole_longitude = -168.
Trying this grid text below again doesn't work
gridtype = lonlat
xsize = 2
ysize = 2
xfirst = 12
xinc = 0.0200000032782555
yfirst = 47
yinc = 0.0200001001358032
because the result has the center at 47 and 12.
But how can I identified the correct corner from the grid caratheristics from original netcdf?