modification of the model code for ch4 average input as surface boundary to linoz_v3 - #64
modification of the model code for ch4 average input as surface boundary to linoz_v3#64jinboxie wants to merge 5 commits into
Conversation
… conserve chemical mass The UCI interpolation algorithm is implemented. It is tested for linoz v2/v3.
We added a ch4_avg_srf set as the latitude weighted average of the ch4_clim cross-section. The data is read using a separate read_pt_trc_linoz to read in and set the variable as ch4 boundary used to obtain ch4max in lin_strat_chem.F90
|
@tangq The code is being tested for longer time and will be posted once ready. |
|
@jinboxie , can you post a figure of ch4_avg_srf time series from the Linoz netcdf input file? |
| real(r8), dimension(:,:), pointer :: linoz_dPmL_dO3col | ||
| real(r8), dimension(:,:), pointer :: linoz_cariolle_psc | ||
| real(r8), dimension(:,:), pointer :: linoz_o3lbs | ||
| real(r8), dimension(:,:), pointer :: linoz_ch4_avg_srf |
There was a problem hiding this comment.
linoz_ch4_avg_srf should be 1-dimensional for each month.
There was a problem hiding this comment.
Hi Qi @tangq . We had to follow the input workflow by the original way,
flds(f)%input(i)%data, where data is in 3d data(:,:,:).
the variable right here refer to the data linoz_ch4_avg_srf => fields(ch4_avg_srf_ndx) %data(:,:,lchnk )
How about I use this reference in code?
real(r8), pointer :: linoz_ch4_avg_srf
linoz_ch4_avg_srf => fields(ch4_avg_srf_ndx) %data(1,1,lchnk )
There was a problem hiding this comment.
@wlin7 , @singhbalwinder , this PR is to implement the pre-calculation of CH4 data as part of the Linoz input file to fix the related chemUCI non-BFB threading issue. Does the input data have to be 3D (time, lat, lev)? The pre-calculated CH4 input variable is 1D (time). Is there a better way to handle 1D input data? Thanks.
@jinboxie , let's get suggestions from @wlin7 or @singhbalwinder before we move forward with fields(ch4_avg_srf_ndx) %data(1,1,lchnk ).
There was a problem hiding this comment.
@tangq Hi Qi, For the inputdata, it is ch4_avg_srf(time). It is just when inside the code,
the shape of readin array flds%input%data has to follow 3D.
We had to follow this in the I/O input part (Refer to line 1293 and line 1979 in tracer.F90)
| xsfc(4,:)= linoz_ch4_clim(:,pver) ! ch4 (constant throughout latitude) | ||
| ch4max = maxval(linoz_ch4_clim(1:ncol,pver)) | ||
|
|
||
| ch4max = maxval(linoz_ch4_avg_srf(1:ncol,:)) |
There was a problem hiding this comment.
linoz_ch4_avg_srf should be a single number for each timestep.
We should also abandon the miss-leading "ch4max" variable. What about renaming it to "ch4avg"?
There was a problem hiding this comment.
So we don't need maxval.
then what about
ch4avg=linoz_ch4_avg_srf
?
Hi Qi. It is posted. |
|
This is good. Can you revise the x-axis to show years to make it clearer?
|
The code is modified to input ch4_clim surface boundary as a lat-weighted average (named as ch4_avg_srf) of the globe and input to linoz_v3.

The monthly surface ch4 boundary is shown below:
The difference of the current PR #64 with the previous PR #62 is shown below. There are no significant difference between them.




