Project

General

Profile

Need help to extract a certain region data

Added by naeem saddique almost 4 years ago

Hello everyone,
i am working on CORDEX-SA data and i want to extract my study area by using the shapefile. I tried with different ways but its not working. Please help me how can i extract certain region data. Please find the files in the attachment.
Thanks


Replies (8)

RE: Need help to extract a certain region data - Added by Karin Meier-Fleischer almost 4 years ago

Hi Naeem,

you have to remap the mask data to the same grid of the data before you can use it

cdo -div TOT_PREC_1970.nc -remapbil,TOT_PREC_1970.nc Jhelum_netcdf_degree.nc outfile.nc

-Karin

RE: Need help to extract a certain region data - Added by naeem saddique almost 4 years ago

Thank you very much for you response but when i tried the code you mentioned above, i get the following error
"Aborted (core dumped)".What this error shows?
Thank you.

RE: Need help to extract a certain region data - Added by naeem saddique almost 4 years ago

sorry i am late, with the following example and data its working perfectly, this example already ans by someone in group.

cdo mul -selname,altcddETCCDI altcdd_yr_HFB_4K_CC_m101_2051-2110.nc China.nc masked.nc

This means version is ok, there is some problem in data.

RE: Need help to extract a certain region data - Added by naeem saddique almost 4 years ago

Karin Meier-Fleischer wrote:

Hi Naeem,

you have to remap the mask data to the same grid of the data before you can use it

[...]

-Karin

Dear CDO users,
still, i am not able to figure out the problem. could you please help me and attach output also.
Thanks.

RE: Need help to extract a certain region data - Added by Karin Meier-Fleischer almost 4 years ago

cdo -selvar,altcddETCCDI altcdd_yr_HFB_4K_CC_m101_2051-2110.nc infile.nc

cdo -f nc -expr,'China = ((China > 0.0)) ? 1.0 : 0.0' -remapnn,infile.nc China.nc mask_remap.nc

cdo -mul infile.nc mask_remap.nc outfile.nc

RE: Need help to extract a certain region data - Added by naeem saddique almost 4 years ago

This example cdo -selvar,altcddETCCDI altcdd_yr_HFB_4K_CC_m101_2051-2110.nc infile.nc already working in my computer also,
my problem is with this Jhelum_netcdf_degree.nc, you run this data please, i again attached the files.
thanks.

RE: Need help to extract a certain region data - Added by Karin Meier-Fleischer almost 4 years ago

What? See my first answer! The files are identical and the command mentioned above works fine.

    (1-8/8)