Cropping climate model files

Requirements

Introduction

Regional Climate Models (RCMs) normally cover continental domains (e.g., Europe, South America, North America, Africa, etc.). Therefore, the size of the RCM output files is large and difficult to use. As impact studies are normally developed for local or regional scales, only a certain area of the entire domain is required for the assessment.

This tutorial provides the steps to crop RCM outputs (NetCDF files) for a specific region within the RCM domain. A file with smaller size with the RCM outputs for the desired area is obtained following these steps:

  1. Visualize the RCM output file using the weather and climate toolkit. The toolkit can add shapefiles to overlay the NetCDF and also point-extract data (coordinates and gridcell value) from the NetCDF.
    • Open the NetCDF using Data(on the left menu)>Browse to select the folder where the NetCDF is located; then press ‘List files’ and select the NetCDF file and open it by pressing ‘Load’.

2. Insert a shapefile of the study site using the ‘Layers’ option in the left menu and then ‘Overlay Selector’ option. To browse for the desired file press ‘Load Shapefile’ at the bottom of the menu and browse for the file.

3. Using the ‘Identification Results’ button, obtain the coordinates of the box containing the study site. For example, extract the Northernmost, Southernmost, Easternmost and Westernmost points of the area.

4. Crop the NetCDF to the selected box which includes the study area using the CDO.

In the Linux command line, go to the folder where the NetCDF is located and write the following commands

mkdir crop
cdo sellonlatbox,latmin,latmax,lonmin,lonmax filename.nc cropped/new_filename.nc

Example of the use of sellonlatbox using a loop

5. Confirm that the cropped NetCDF covers the desired area by opening it using the weather and climate toolkit

Leave a comment