Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion models/ROMS_rutgers/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ module model_mod
integer :: assimilation_period_seconds = 0 ! Assimilation window in secs
real(r8) :: perturbation_amplitude = 0.02 ! Perturbation size for generating an ensemble
integer :: debug = 0 ! Turn up for more debug messages
logical :: convert_salinity_to_kgkg = .true. ! model_interpolate salinity ouput in kg/kg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would default this to .false. and add it to the input.nml given its importance

Copy link
Member Author

@hkershaw-brown hkershaw-brown Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatting with the WHOI folks about this who agree, PSU is the way to go as the default.
Crocolake converter - PSU
MOM6, ROMS - option to have /1000 so you can use the dart bank of WOD obs on glade, but default is PSU.


character(len=vtablenamelength) :: &
variables(MAX_STATE_VARIABLE_FIELDS_CLAMP) = ' ' ! Table of state variables and associated metadata
Expand All @@ -140,7 +141,8 @@ module model_mod
perturbation_amplitude, &
roms_filename, &
debug, &
variables
variables, &
convert_salinity_to_kgkg

! Interpolation grid handles
type(quad_interp_handle) :: interp_t_grid, &
Expand Down Expand Up @@ -352,6 +354,8 @@ subroutine model_interpolate(state_handle, ens_size, location, qty, expected_obs
logical :: on_land


real(r8), parameter :: CONCENTRATION_TO_PPT = 1000.0_r8

type(quad_interp_handle) :: interp

if (.not. module_initialized) call static_init_model
Expand Down Expand Up @@ -472,6 +476,8 @@ subroutine model_interpolate(state_handle, ens_size, location, qty, expected_obs
expected_obs = sensible_temp(expected_T, expected_S, pdbar)
endif

if (convert_salinity_to_kgkg .and. qty == QTY_SALINITY) expected_obs = expected_obs / CONCENTRATION_TO_PPT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good. This is the right location. We don't want to do that prior to the sensible temperature computation (we need salinity to be in PSU there).


istatus = 0

end subroutine model_interpolate
Expand Down
4 changes: 4 additions & 0 deletions models/ROMS_rutgers/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ The table below describes the configurable variables in this namelist:
- `character(len=vtablenamelength), dimension(MAX_STATE_VARIABLES * table_columns)`
- `' '`
- Specifies the list of ROMS variables to be assimilated. The variable table is parsed as flat strings with metadata.
* - ``convert_salinity_to_kgkg``
- `logical`
- `.true.`
- If true, module_interpolate salinity output is converted to kg/kg, otherwise PSU (g/g) is used. Be sure to match observation units.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PSU (g/kg)



Variables Table Format
Expand Down