Masking region using shapefile or netcdf file
Added by aradhana yaduvanshi over 7 years ago
Is there any operation or code to mask the netcdf using shapefile or netcdf file?
I have tried using the nc files, but in which time dimension is not same for both the nc files. It's causing error.
This is the command.
FILEINPUT_INDIA="imd.nc"
FILEINPUT_MODEL="canesm.nc"
FILEOUTPUT="canesm_his.nc"
cdo -s remapbil,${DIRINPUT}/${FILEINPUT_INDIA} \
${DIRINPUT}/${FILEINPUT_MODEL} \
${DIROUTPUT}/tmp.model.nc
cdo -s -gtc,0 ${DIRINPUT}/${FILEINPUT_INDIA} ${DIROUTPUT}/tmp.nc
cdo -s ifthen ${DIROUTPUT}/tmp.nc ${DIROUTPUT}/tmp.model.nc ${DIROUTPUT}/${FILEOUTPUT}
cdo -s outputtab,date,lat,lon,value ${DIROUTPUT}/${FILEOUTPUT} > ${DIROUTPUT}/canesm.txt
rm -f ${DIROUTPUT}/tmp.model.nc ${DIROUTPUT}/tmp.nc
Thank you
Replies (1)
RE: Masking region using shapefile or netcdf file - Added by Ralf Mueller over 7 years ago
Hi!
Without the input data it's hard to commont on that
regards
ralf