FFSL linear model transport#414
FFSL linear model transport#414James Kent (jameskent-metoffice) wants to merge 4 commits intoMetOffice:mainfrom
Conversation
|
I realise that this code is still in draft status, but I thought that (with the approaching review deadline) it would be useful to add a review now. Science review 1Many thanks for putting this linear FFSL code together. The nonlinear FFSL code is quite complicated so I would like to congratulate you on navigating a path forwards with this. As you have mentioned, there are some differences between the MoL and FFSL plots, especially at the model top. However, these can likely be resolved with further investigation in future work – and it will be good to have this code on trunk so that we have something to start with. I have a few (hopefully minor) comments that need to be addressed. Comments at L255 of tl_ffsl_vert_alg_mod.x90 and L339 of tl_ffsl_hori_alg_mod.x90 ‘Linear scheme’ variable Variable names Please define (with a comment) what ls_field_new_with_pert, pert_u_ls_field and field_with_ls_wind are – as they don’t seem very clear to me. Please could we rename field to field_n (in tl_ffsl_control_alg_mod) so as to be consistent with the corresponding nonlinear code. Similarly with ls_field, field_w3_shifted, ls_field_w3_shifted and field_ptr. Generally the rules for naming variables in the linear model is that e.g. for the variable in the nonlinear code, this becomes flux for the perturbation in the linear model (i.e. the same name) and ls_flux for the linearisation state. There are some variable names e.g. mass_flux_pert that could be changed to follow this. tl_ffsl_control Configuration options It may be better to add FFSL configuration options to the default rose-app.conf if these are the default FFSL config options for FFSL in the linear model, as long as they only affect FFSL and not the other configurations. This could be changed on a follow-on pull-request. Something to think about really. Integration tests |
PR Summary
Sci/Tech Reviewer: cjohnson-pi
Code Reviewer:
The linear model currently uses MoL transport. Using FFSL should improve performance and mean we use the same transport scheme for linear and non-linear transport.
This PR has added the tangent linear FFSL code. I have created the control routines for horizontal and vertical transport, and then used the existing FFSL kernels. This builds on the split transport routine added in PR#149.
The linear transport has two parts, u' dot grad(ls_f) and ls_u dot grad(f'). For the u' dot grad(ls_f) term, as this is a flux-form semi-Lagrangian method, we need to first transport ls_f by ls_u, and then compute the flux using u' with this. This is documented in the code.
I have added a C12 test using FFSL (for both azspice and ex1a) and also a C224 test. The C224 test is run with a smaller dt than the MoL version - this is due to the stability of FFSL depending on the Lipschitz number and any stability fixes we use being non-linear in nature.
Results for C12 NWP Linear Model Test:
This is MoL on trunk showing u:
This is FFSL showing u:
This is MoL on trunk showing theta:
This is FFSL showing theta:
FFSL has produced larger velocities and theta values near the model top.
Code Quality Checklist
Testing
trac.log
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review