Changes to code between MOPS V2.1 (directory OptECCO) and this version MOPS V2.3UVicTMs Iris Kriest, 10 January 2020 The code applied to run MOPS in UVOK (Kvale et al., 2017) TMs and forcing differs from that used in OptECCO, partly due to general improvements to the TMM code (1), to additional computation of OMZ metrics and different ways of optimisation (2), and because of different units in forcing files (3). Below are the detailed changes to the code, in comparison to the code in directory "../OptECCO". ----------------------------------------------------------------------------------------- (1) CHANGES TO ALLOW FOR A MORE FLEXIBLE TIME STEPPING: - For details of changes to the driver code (tmm_*.*, petsc_*.*) see github.com/samarkhatiwala/tmm - Include a more flexible timer routine for output and misfit computation in the TMM code. This makes it easy to account for variable days per year. - adds file tmm_timer.h - affects external_forcing_mops_biogeochem.c - affects insolation.F and mops_biogeochem.h - affects tmm_misfit.h - affects mops_biogeochem_misfit_data.h - affects misfit_rmse_mops_biogeochem.c (new misfit function, see below) - affects runscript: see directory ../../Runscripts/OptUVic ----------------------------------------------------------------------------------------- (2) CHANGES TO ALLOW FOR A MORE FLEXIBLE MISFIT COMPUTATION INCL. FIT TO OMZS: - Compute misfit to OMZs, even if these are not accounted for in the misfit function - the misfit function is now named misfit_rmse_mops_biogeochem.c instead of tmm_misfit.c !! - affects mops_biogeochem_misfit_data.h - Decide about multiobjective or single objective optimisation during runtime - affect mops_biogeochem_misfit_data.h (add boolean switch multiObjective) - affects misfit_rmse_mops_biogeochem.c (new misfit function, see below) - affects runscript, if multi-objective is desired ----------------------------------------------------------------------------------------- (3) CHANGES TO ADAPT THE MOPS-CODE TO SPECIFIC FEATURES OF UVIC FORCING: There are only a few changes necessary to adapt MOPS to run with UVOK's TMs and forcing. These are related to the units of layer thickness (cm->m), wind speed (cm/d->m/d) and salinity (UVOK's salinity -> PSU). These changes are invoked using compile option #ifdef UVOKTMS. - account for the fact that drFloc (nominal layer thickness) comes in cm but MOPS requires m - divide by 100 in mops_biogeochem_ini.F - account for the fact that bgc_wind comes in cm/d, but MOPS requires m/d - divide by 100 in BGC_MODEL.F - account for the fact that salt comes in deviation from 35% PSU but MOPS requires pure PSU - convert to PSU via (stemp+0.035d0)*1000.0d0 in BGC_MODEL.F - account for the fact that UVOK provides files aice_ and hice_ (instead of percent ice coverage fice_) - use aice_ in external_forcing_mopd_biogeochem.c ----------------------------------------------------------------------------------------- FURTHER: Changes made to the original UVOK forcing and initial value files: - Original dz.petsc of UVic comes in cm. I use a file that has been converted to m. - Original initial value files come in: O2: mol/m3 -> convert to mmol/m3 plankton: mmol N/m3 -> convert to mmol P/m3