Closed arporter closed 7 years ago
I now have the code at least looking like the NEMOLite2D code in terms of its use of infrastructure. The code compiles but currently the 1D and 3D 'support' in the infrastructure consists of only stubs that define the interfaces. I'll flesh those out next as part of https://github.com/stfc/dl_esm_inf/issues/1
Code now compiles and runs using dl-esm-inf.
Back to the age-old problem of arranging loop limits so as to get the same answers as the original. I note that the routine that outputs the final field does:
DO jk = 1, jpk-1
DO jj = 2, jpj-1
DO ji = 2, jpi-1
This suggests that the 'internal' region of the domain is (2:jpi-1,2:jpj-1,1:jpk-1)
. Given that it is a tracer kernel we're working on, it is a tracer field that is output (mydomain
in our benchmark code) and therefore it must be on T points.
NEMO uses an Arakawa C grid with 'NE' offset - i.e. {U,V,F} grid points to the North and East of a given T point have the same grid indices.
It was actually relatively pain-free for once. Main problem was that I was not initialising the u, v and T masks in the same way as in the original code. Also had to allow for the fact that dl_esm_inf puts boundary points all round the domain and assumes these are part of the specified grid dimensions provided by the T mask. This would not be a problem if we had a proper routine for interrogating the T-mask to get the domain boundaries (and if we had realistic T-mask values which, in this case, we don't).
Over to Rupert for review...
Pull request merged to master. Closing issue.
In order for a code to make use of a DSL, it must make use of the infrastructure associated with the implementation of the DSL. In this issue we will start to change the code to use the infrastructure provided by https://github.com/stfc/dl_esm_inf (previously developed for 2D models in the GOcean project).