-
Notifications
You must be signed in to change notification settings - Fork 167
ROMS option to have model_interpolate salinity units in kg/kg (default) or g/kg #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PSU (g/kg) |
||
|
|
||
|
|
||
| Variables Table Format | ||
|
|
||
There was a problem hiding this comment.
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 theinput.nmlgiven its importanceUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.
- [ ] new version of existing WOD on /glade/ ? *1000?