CICE-Consortium / CICE

Development repository for the CICE sea-ice model
Other
55 stars 131 forks source link

tracer index improvements #238

Open apcraig opened 5 years ago

apcraig commented 5 years ago

There are several tasks that should be considered moving forward. This is related to #115 and #212.

  1. test arbitrary tracer index order for bit-for-bit. understand tracer dependencies and order requirements better. allow tracers to be indexed in any order as much as possible.
  2. get rid of the "unused" tracer and set n_[tracer] to 0 (or -1) for tracers that are inactive. make sure that works (see count_tracers)
  3. get rid of the icepack_max parameters in CICE to define array sizes, use sizes computed at runtime. may require upgrades to both icepack and cice to allow for dynamic sized arrays to be passed between cice and icepack. might require addressing non-assumed shape/size arrays in interfaces.
  4. make sure arguments to subroutines passed in as array sections are working ok for non-active tracers with invalid or arbitrary index (related to 2)
  5. make subroutine argument sizing more robust and extensible, move to assumed size/shape where needed, make sure if an array size is passed as an argument that the implementation is correct, avoid mixing dynamic and static arrays on both sides of a subroutine interface.
  6. review icepack_tracer routine where tracer index and count are determined from max values. this is inconsistent with dynamics tracer counts in cice.
  7. test/document how to add tracers, confirm bit-for-bit with new non-interactive tracers.
eclare108213 commented 4 years ago

During the isotopes implementation #423 I noticed a few tracer indices needing to be cleaned up when their respective capability is turned off. In particular, ntrcr=the total number of tracers+1 (item 2 above), and these tracer indices are set to ntrcr: nt_aero, nt_bgc_S, nt_fsd, nt_fbri (there are probably others). nt_zbgc_frac is (still?) not initialized properly and gets set to some arbitrarily large integer rather than 0 or ntrcr.