p4zsms
Overview
The p4zsms module manages the Source Minus Sink (SMS) terms for biogeochemical tracers, handling biological and chemical reactions, sedimentation, and mass conservation based on the model configuration.
Module Name: p4zsms
Model: PISCES (version NEMO 5.0)
Subroutines: p4z_sms, p4z_sms_init, p4z_rst, p4z_dmp, p4z_budget
p4z_sms
Primary routine that manages the biological and chemical sources and sinks.
Functionality
- Initializes chemical constants and pH at first timestep
- Applies tracer damping if enabled
- Computes time step variables for biological SMS processes
- Stores initial tracer concentrations
- Processes external nutrient sources
- Computes chemical constants
- Computes auxiliary fields/rates
- Executes sub-timestep iterations:
- Calls biological processes
- Handles calcite saturation
- Manages bottom boundary conditions
- Computes surface fluxes
- Corrects negative tracer concentrations
- Calls sediment module if enabled
- Calculates trends and updates tracers
- Writes PISCES restart
- Performs budget checking
Input parameters
| Parameter | Type | Intent | Description |
|---|---|---|---|
kt |
INTEGER | IN | Current time step index |
Kbb |
INTEGER | IN | Time level index (before) |
Kmm |
INTEGER | IN | Time level index (now/middle) |
Krhs |
INTEGER | IN | Right-hand side index |
Negative Concentration Handling
The module implements a scaling approach to prevent negative tracer concentrations:
- Identifies cells where tracers would become negative
- Calculates scaling factor (
xnegtr) to limit the magnitude of sinks - Applies the scaling factor to all SMS terms at that location
p4z_sms_init
Initializes the PISCES model by reading namelist parameters in the nampisbio block.
Configuration Parameters
nrdttrc: Frequency for biology calculations (time splitting)wsbio: POC sinking speed (small particles)xkmort: Half-saturation constant for phytoplankton and zooplankton mortalityferatz,feratm,no3rat3,po4rat3: Fe/C, N/C, P/C ratios of zoophytoplanktonwsbio2,wsbio2max,wsbio2scale: Parameters for big particles sinking speedldocp,ldocz,lthet: Prognostic ligand production parametersln_pisdmp,ln_pisdmp_alk: Damping/relaxation configuration
p4z_rst
Handles reading/writing of restart files. If the variables are not present in the restart file or if the restart file does not exist, then they are initialised to characteristic values.
Variables Managed
- pH
- Thetanano (
ln_p2z) - Silica limitation and maximum values
- Fe\(^3\) consumption by phytoplankton
- Mean remineralization rates of particles (
POC,GOC) - Cumulative CO\(_2\) fluxes
- Size proxies for phytoplankton groups
Input Parameters
| Parameter | Type | Intent | Description |
|---|---|---|---|
kt |
INTEGER | IN | Current time step index |
Kbb |
INTEGER | IN | Time level index (before) |
Kmm |
INTEGER | IN | Time level index (now/middle) |
cdrw |
CHARACTER | IN | "READ" or "WRITE" flag |
p4z_dmp
Performs the damping/relaxation of total budget for some tracers. This damping prevents the model from deviating too much from the observed mean values in these tracers.
Tracer Relaxation Targets
- Alkalinity: 2426 (mean value)
- PO\(_4\): 2.174 (mean value)
- NO\(_3\): 31.00 (mean value)
- Silicate: 90.33 (mean value)
Input parameters
| Parameter | Type | Intent | Description |
|---|---|---|---|
kt |
INTEGER | IN | Current time step index |
Kmm |
INTEGER | IN | Time level index (now/middle) |
p4z_budget
Checks the mass conservation of several tracers.
Budgets Calculated
- NO\(_3\)
- Iron
- Total Alkalinity
- PO\(_4\)
- Silicate
- Nitrogen fixation by diazotrophs
- Denitrification in the water column and the sediment
Input parameters
| Parameter | Type | Intent | Description |
|---|---|---|---|
kt |
INTEGER | IN | Current time step index |
Kmm |
INTEGER | IN | Time level index (now/middle) |
Additional Information
Multiple Model Configurations
The code supports multiple configurations via logical flags:
ln_p2z: Two-component modelln_p4z: Four-component modelln_p5z: Five-component modelln_ligand: Controls ligand processesln_sediment: Enables coupled sediment model
Time Management
rfact: Main PISCES time steprfact2: Biological SMS time step (allows sub-stepping)xstep: Time step relative to day length- Multiple iterations (
nrdttrc) can be performed within each tracers time step
Notes on Implementation
- ORCA grid configuration is specifically addressed for global calculations
- Includes both local-grid and global-sum operations
- Uses XIOS library for standardized output management
- Restart capabilities ensure simulation continuity
Document Version: 1.0
Last Updated: October 2025
Source code: NEMO 5.0