Submitting hybrid code to trunk
Introduction
Unless I'm going to keep migrating my code through all the versions,
it would be good to start thinking about getting the code into the
trunk. Rather than submit one massive branch, it would seem sensible
to try and break it so that one problem doesn't prevent everything
being submitted to trunk and it makes it more manageable to code
review. What chunks can I break the hybrid code into?
The submission scripts
Paul Creswell and the rose team have encouraged me to get this in,
and Paul might be good choice for SciTech review (some of the code is
his).
I'll need to include use of STASH_CPL_XTRA etc in Rose.
The files are
- rose-meta/um-atmos/HEAD/rose-meta.conf
- bin/um-coupled_2um (probably rename to um-coupled-hybrid)
- bin/create_namcouple.pl
- fcm-make/inc/um-atmos-common.cfg (I'll need to add
um-coupled-hybrid and create_namcouple.pl to build-atmos.target
arguments.
- control/coupling/coupling_control_namelist.F90
- src/control/top_level/tstmsk.F90 (replacing L_OASIS with L_OCEAN
for the ocean bits)
Maybe call this branch vn10.4_setup_hybrid and put it on my home
directory, so that others can make use of the rose-meta.conf file.
3D coupling
This originates from Richard, so maybe he should do the ticket
summary for this and I'll do the SciTech review. If so, I should
probably get branch working and then hand over.
I think we'll need a flag, such as L_COUPLING_3D, which is true
if either L_SENIOR or L_JUNIOR is true (maybe one of these is true if
ATM_COMP is set).
The files are
- bin/OASIS_conf
- bin/OASIS_fields
- src/control/coupling/oasis3_grid.F90
- src/control/top_level/oasis_read_translist.F90 (most of this is
3D stuff, except the my_component stuff)
- src/control/oasis_atm_data_mod.F90 (edit the type TRANSIENT)
- control/top_level/um_shell.F90 (need to define L_JUNIOR and
L_SENIOR)
Maybe call this branch vn10.4_coupling_3d_fields.
Replacing OASIS with OCEAN
Replacing L_OASIS with L_OCEAN
The files are
- src/control/top_level/tstmsk.F90 (probably move into section
above)
Maybe I can like in this change with the Rose changes in
section above
Replacing #if defined(OASIS) with #if defined(OCEAN)
Probably not needed - as code wont be called if ocean
is not called
- src/control/coupling/oasis3_geto2a.F90
- src/control/coupling/oasis3_puta2o.F90
- src/control/coupling/oasis_inita2o.F90
- src/control/coupling/oasis_tidy.F90
- src/control/coupling/oasis_update.F90
Restructuring calls to OASIS_PUT and OASIS_GET
For atmos<->ocean calls
Testing the GC3 setup should test if there's any thing to be
gained from re-arrangement, because we can send almost all the
fields needed by ocean before call to UKCA_MAIN1 (the only field
which needs to be afterwards is total dust deposition rate if this
is calculated in UKCA). If this isn't
beneficial, it isn't worth doing the restructuring for Snr<->Jnr
either (but it should be).
For Snr<->Jnr
If we can re-arrange code calls for atmos<->ocean, adding
the Snr<->Jnr calls should be fairly easy. We could even lump
in with the section below.
General
The files are
- src/control/coupling/oasis_send_recv1.F90
- src/control/coupling/oasis_send_recv2.F90
- src/control/coupling/oasis_send_recv3.F90
- src/control/top_level/u_model_4A.F90
I don't currently know how much, if any, time this restructing
saves so I should find out.
Coupling Snr<->Jnr fields (the big one!)
The files are
- control/coupling/oasis3_atmos_init_mod.F90
- control/coupling/oasis3_get_jnr.F90
- control/coupling/oasis3_get_jnr_stub.F90
- control/coupling/oasis3_get_snr.F90
- control/coupling/oasis3_get_snr_stub.F90
- control/coupling/oasis3_put_jnr.F90
- control/coupling/oasis3_put_jnr_stub.F90
- control/coupling/oasis3_put_snr.F90
- control/coupling/oasis3_put_snr_stub.F90
- control/coupling/oasis_atm_data_mod.F90
- control/coupling/oasis_init_2ums.F90 (probably rename to
oasis_init_hybrid.F90)
- control/coupling/oasis_init_2ums_stub.F90
- control/coupling/oasis_tidy_2ums.F90
- control/coupling/oasis_tidy_2ums_stub.F90
- control/top_level/oasis_intialise_2.F90 (I think I'll just need
to add call to OASIS_INIT_2UMS)
- control/top_level/oasis_point_translist.F90
- control/top_level/oasis_read_translist.F90 (most of the stuff here
is 3D stuff, but we need `my_component' to be JNR)
Coupling orography from Snr->Jnr
This section heavely overlaps in oasis_init_2ums.F90 with section
above, so would only make sense to split if submitting across two
different UM versions
The files are
- control/coupling/oasis3_get_orog_jnr.F90
- control/coupling/oasis3_get_orog_jnr_stub.F90
- control/coupling/oasis_init_2ums.F90 (also needed for Snr<->Jnr
coupling)
- control/packing_tools/mask_compression.F90 (added EXPAND_FROM_MASK2)
- control/top_level/initial_4A.F90 (moving call to
OASIS_INITIALISE_2 up code)
Stripping UKCA from Snr
The files are
- atmosphere/UKCA/init_radukca.F90
- atmosphere/UKCA/ukca_radaer_get.F90
- atmosphere/convection/convec2-conv24a.F90
- atmosphere/convection/ni_conv_ctl.F90
- atmosphere/large_scale_precipitation/lsp_autoc.F90
- atmosphere/tracer_advection/eg_group_tracers.F90
- atmosphere/tracer_advection/eg_ungroup_tracers.F90
- atmosphere/tracer_advection/sl_tracer1-sltrac1_4A.F90
- atmosphere/tracer_advection/tr_reset_4A.F90
- atmosphere/tracer_advection/tr_set_phys-tr_set_phys_4A.F90
- atmosphere/tracer_advection/unpack_tracer.F90
- control/coupling/check_jnr_send.F90
- control/top_level/atm_step_4A.F90
- control/top_level/setcona_4A.F90
Changes to UKCA_ACTIVATE
Further science changes to come ...