I’m trying to get JULES to calculate the average over the time interval 11.30-13.00 of a 15 day time period. For now I think it is averaging over the whole day. And I am trying to do a similar thing with light co2 and surface pressure.
This part of code can be found in main/branches/dev/wenyaogan/r24333_pmodel/src/control/shared/surf_couple_extra_mod.F90
I wonder if you know which variables would be related and how I could narrow it down to certain time period of a day.
You can see that
t_growth_gb is computed from
If you look in the code for
grep -ir tl_1_gb (after first changing directory to the root directory of your code repository), you can see where that is defined. It turns out to be defined as
forcing%tl_1_ij, so you can do a
grep -ir tl_1_ij * | grep -v ‘ftl_1_ij’. The extra
grep is to not print out lines that have ‘ftl_1_ij’.
You will see a line of the grep output that says:
src/io/model_interface/populate_var.inc: CALL cube_get_data(cube,forcing%tl_1_ij)
So the forcing data for near-surface air-temperature
tl_1_ij is read in from the forcing data files, as defined in your suite.
tl_1_gb is the near-surface air temperature for compressed-to-landpoints (depending on the landpoint index l, whereas the
tl_1_ij is the near-surface air temperature for i,j coordinates before compression to landpoints. Both are in Kelvin.
I also see
crop_vars%tl_1_day_av_gb in that same file that you have.
So you can do
grep -r tl_1_day_av_gb *.
One of the grep lines shows:
src/science/vegetation/crop_date_mod.F90: tl_1_day_av_gb(l) = tl_1_day_av_gb(l) + tl_1(i,j) / REAL(tspd).
Maybe you can use similar code for what you want? You might need to get the crop model fully working with your suite to do that?
Thanks for your reply. Just to make sure I understand what you mean. Are you saying that I have to change the definition of my forcing data files otherwise I would not be able to limit it down to a smaller time frame? And thank you for pointing for the tl_1_day_av_gb. I will take a look at that as well.
Yes, I suspect that you might be using 6-hourly forcing data. If you want averages over 1.5-hour time periods over 15 days, you probably need forcing data with time increments of less than or equal to 1.5 hours.
Thanks for your help. In that case would it work if I simply interpolate the data into a higher frequency and only keep the data from 11.30-13.00? Will this affect the rest of the model.
Interpolating to higher frequency might be a good first step, but in reality, I think you need native high-frequency data to do what you want to do. Otherwise, you will likely miss the phenomena around noon that you want to observe.
I took another look at JULES’s description file, apparently it does interpolation automatically through setups.
Does this mean tl_1_gb is already in 30min timestep (for example）？ I am still not sure how to select 11.30-13.00 when I have the half hourly data…
Yes, I think you might be right that the tl_1_gb is already interpolated and JULES is referencing the interpolated values in the code.
You can look at how tl_1_day_av_gb is computed to see how the arrays are referenced for the different hours of the day.
But I think (in the end) you will want to use higher frequency driving data instead of interpolating the driving data.
Thanks for your help. It helps a lot.
You’re more than welcome! I’m glad it helps.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.