Project

General

Profile

HI

Added by Naresh Neupane almost 5 years ago

I have two variables

(1) daily_temperature for 365 days of a year in temperature.nc (lat, lon, 365) file and

(2) Maxium_Greenness_Day (the values are DOY, just one layer or 1 time period that displays the day of year when the pixel becomes maximum green). So this has dimension (lat, lon, 1).

I interpolated both to same grid size. As the two files did not have same time period, and I duplicated the Maximum_Greenness_Day file 365 times and made it a year long file. Then, I combined the two files and made it one.

I want to do this:
I want to accumulate (sum) temperature from day 1 (t1=1) to (t2=DOY value from second) or day when the greenness is maximum. I mean I want to read the variable value DOY and use it as t2.

OR, I this could also be helpful:
mask out all time periods in Temperature data if time >DOY

Is there way to do it in CDO ?