diff --git a/models/ROMS_rutgers/model_mod.f90 b/models/ROMS_rutgers/model_mod.f90 index 949d28f13..132796b38 100644 --- a/models/ROMS_rutgers/model_mod.f90 +++ b/models/ROMS_rutgers/model_mod.f90 @@ -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 character(len=vtablenamelength) :: & variables(MAX_STATE_VARIABLE_FIELDS_CLAMP) = ' ' ! Table of state variables and associated metadata @@ -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, & @@ -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 @@ -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 + istatus = 0 end subroutine model_interpolate diff --git a/models/ROMS_rutgers/readme.rst b/models/ROMS_rutgers/readme.rst index 6dbe51879..d48c64114 100644 --- a/models/ROMS_rutgers/readme.rst +++ b/models/ROMS_rutgers/readme.rst @@ -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. Variables Table Format