I understood how to calculate the slhf and sshf for 03, 06, 09 and 12 time steps. But I have values for 00, 15, 18 and 21 time steps as well. If the accumulated fields have base time for forecast values at 00:00:00 and 12:00:00, then how average values for 00, 12, 15, 18 and 21 time steps are calculated. I need average flux values for every 3-hour.
Thanks for your inputs.
The thing is, despite flux being commonly thought of in physics as BetterExplained.com suggests:
Timing: We measure flux at a single point in time. Freeze time and ask “Right now, at this moment, how much stuff is passing through my surface?”. If your field doesn’t change over time, then all is well. If your field does change, then you need to pick a point in time to measure the flux.
But, fairly counter-intuitively to many, meteorological models often, despite naming their variables as flux (such as sshf... surface sensible heat flux), actually store them as accumulations. This ECMWF whitepaper on archive data specifications explains:
Physical fluxes archived by the ECMWF model are accumulated since the start of the relevant forecast, and therefore in units of $\mathrm{Jm^{−2}}$ (or $\mathrm{W m^{−2}\cdot s}$). Thus, a daily mean (in $\mathrm{W m^{− 2}}$) is obtained by retrieving the accumulated fluxes at $\mathrm{t_1=t}$ and $\mathrm{t_2=t}+ \mathrm{24\;hours}$ (where $\mathrm{t}$ is the time of the start of the average), taking the difference and dividing by 86400, the number of seconds in a day.
So, though intuitively, you might think the surface sensible heat flux at 6 hours would just be the sshf variable in the 6 hour file, it isn't. To get the best estimate of the flux, you'd need to calculate it as:
$$\mathrm{\frac{fluxvar_{(this\;timestep)} - fluxvar_{(previous\;timestep)}}{timestep_{(in\;hours)}\cdot3600}}$$
So if you want to find the average flux between hours 3 and 6, you'd do:
$$\mathrm{\frac{fluxvar_{(t=6hr)} - fluxvar_{(t=3hr)}}{3\cdot3600}}$$
A couple of questions that Vidhi asked about that may be worthwhile understanding to others:
Anytime derived values (variables that aren't in the model itself, but require a formula to determine) need calculating, such as total surface heat flux, just make sure that when you combine the variables (in this case the shortwave, longwave, sensible, and latent heats), you only divide by the timestep once (don't divide by 10800 in the separate input variables beforehand, then divide by 10800 again after combining them).
The models are strange to many. I just happened to incorrectly remember what a flux was, and get the "divide by 10800" math right (probably in part due to horror memories of working with similar files in years gone by!). But hopefully this helps some confused people!