Project

General

Profile

Select different months in both hemispheres

Added by Francis Tom about 1 year ago

Hello,

I would like to know if it is possible to have different months selected for the northern hemisphere and the southern hemisphere in a single global .nc file.

I have 30-year daily precipitation data (running from January to December every year), but I want all my northern hemisphere months to be "June-July-August-September" and my southern hemisphere months to be "November-December-January-February," like focusing on the extended summer in both hemispheres. Can someone assist with this? Thank you


Replies (4)

RE: Select different months in both hemispheres - Added by Estanislao Gavilan about 1 year ago

Hi Francis,

you need to use the command "-selmonth" and "-sellonlatbox". Something like

cdo -sellonlatbox,lon1,lon2,lat1,lat2 -selmonth,1/12 input.nc output.nc

This command will select the months from January to December. Then, it will select the area inside the box. You just need to edit it for your specific case.

Kind regards,

Estanislao

RE: Select different months in both hemispheres - Added by Francis Tom about 1 year ago

Hi Estanislao,

Thank you for your response, but that is not really what I want to do.

I want a different season in the NH and SH in a single netcdf file, such that the NH months will be June -September and SH months will be November-February.

Thanks

RE: Select different months in both hemispheres - Added by Estanislao Gavilan about 1 year ago

Hi Francis,

Well you could try to do something like

cdo setname,NH_data -sellonlatbox,lon1,lon2,lat1,lat2 -selmonth,1/12 input.nc output1.nc

and

cdo setname,SH_data -sellonlatbox,lon1,lon2,lat1,lat2 -selmonth,1/12 input.nc output2.nc

then

cdo -merge 'output1.nc output2.nc' output3.nc

The main issues are: the timeline will be wrong because you cannot keep both time axis; the boxes have to have the same size. Maybe other more experienced users can give you better ideas.

    (1-4/4)