#!/bin/bash

ml CDO/1.9.8-intel-2019b

tphwl_dir="/nird/projects/tphwl_6hr/"
input_dir="/nird/projects/6hr/"
output_dir="/nird/projects/monthly_6hr_ready/"

for y in {1985..2014}; do  
    cdo splitmon ${input_dir}rsds_6hr_${y}.nc ${output_dir}Solar_ICONNORESMhistorical_${y}-
    cdo splitmon ${input_dir}pr_6hr_${y}.nc ${output_dir}Prec_ICONNORESMhistorical_${y}-
    cdo splitmon ${tphwl_dir}tphwl_6hr_${y}.nc ${output_dir}TPHWL_ICONNORESMhistorical_${y}-
done




