Skip to content

Sst relax#1

Open
gbolzon wants to merge 4 commits into
merfrom
sst_relax
Open

Sst relax#1
gbolzon wants to merge 4 commits into
merfrom
sst_relax

Conversation

@gbolzon

@gbolzon gbolzon commented May 15, 2026

Copy link
Copy Markdown

What changes does this PR introduce?

Feature additions to the rbcs package: two new conditions that control when temperature relaxation is applied.

What is the current behaviour?

RBCS_ADD_TENDENCY applies the temperature relaxation unconditionally at every timestep as long as useRBCtemp = .TRUE.. There is no mechanism to apply relaxation only up to a prescribed time of the simulation. rbcsVanishingTime allows only to ramp down the relaxation linearly with time, but it is not possible to switch it off abruptly at a given time. Moreover it is not possible to apply relaxation only in a prescribed time window of the day, for instance at night hours.

What is the new behaviour

Two independent conditions are evaluated before the temperature tendency is applied:

  1. Temperature relaxation is applied at each vertical layer k only if the global minimum of the temperature relaxation field (obtained through a reduction MPI operation across all tiles) is higher than -5°C. In this way if the temperature relaxation file is prepared ad-hoc there is the possibility to stop relaxation at a given time. The idea is to fill all records of the file with negative values smaller than -5 (e.g. -1E20) and overwrite with the values that we want to assimilate only the desired records, for instance only the records corresponding to the spin-up time of a forecast simulation.
  2. Temperature relaxation is applied only in a symmetric time window centered around 00H of each day. The length of the window can be set through a new parameter rbcsTempHalfWindow that can be set in data.rbcs. If that parameter is not set it will assimilate continuously for the whole day. The parameter set the length of half window, so if we want to assimilate from 22:00 to 02:00 its value will be rbcsTempHalfWindow=7200.. If the temperature relaxation file contains daily records of the SST at 00H, to assimilate correctly we need to setup the relaxation parameters as follows:
 rbcsForcingOffset=-43200.0,
 rbcsForcingPeriod=86400.0,
 rbcsForcingCycle=0.0,

and the file must contains a number of records equal to the number of simulation days +1. rbcsForcingCycle can be set to 86400*Nrecords for periodic forcing (for instance for a two year hindcast with one year records).
If another variable is assimilated, e.g. salinity, the corresponding relaxation file must contain the same number of records.

Does this PR introduce a breaking change?

These modifications affect how the temperature relaxation file should be prepared if these new features are going to be used, but the behavior is the same of before if the file is full of "good" values, or also in the accidental case in which there are NaN (in this case relaxation is done with NaN as before).

Other information:

Suggested addition to tag-index

(To avoid unnecessary merge conflicts, please don't update tag-index. One of the admins will do that when merging your pull request.)

@alessioinnocenti

Copy link
Copy Markdown
Collaborator

I have committed the last changes, tested locally the model with different variants of the parameters and of the input file and everything goes smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants