Calculates specific volume of sea water from T, S and P.
Definition at line 65 of file MOM_EOS.F90.
|
subroutine | calculate_spec_vol_scalar (T, S, pressure, specvol, EOS, spv_ref, scale) |
| Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs. More...
|
|
subroutine | calculate_spec_vol_array (T, S, pressure, specvol, start, npts, EOS, spv_ref, scale) |
| Calls the appropriate subroutine to calculate the specific volume of sea water for 1-D array inputs. More...
|
|
◆ calculate_spec_vol_array()
subroutine mom_eos::calculate_spec_vol::calculate_spec_vol_array |
( |
real, dimension(:), intent(in) |
T, |
|
|
real, dimension(:), intent(in) |
S, |
|
|
real, dimension(:), intent(in) |
pressure, |
|
|
real, dimension(:), intent(out) |
specvol, |
|
|
integer, intent(in) |
start, |
|
|
integer, intent(in) |
npts, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
spv_ref, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate the specific volume of sea water for 1-D array inputs.
- Parameters
-
[in] | t | potential temperature relative to the surface [degC]. |
[in] | s | salinity [ppt]. |
[in] | pressure | pressure [Pa]. |
[out] | specvol | in situ specific volume [kg m-3] or [R-1 ~> m3 kg-1]. |
[in] | start | the starting point in the arrays. |
[in] | npts | the number of values to calculate. |
| eos | Equation of state structure |
[in] | spv_ref | A reference specific volume [m3 kg-1]. |
[in] | scale | A multiplicative factor by which to scale specific volume from m3 kg-1 to the desired units [kg m-3 R-1] |
Definition at line 264 of file MOM_EOS.F90.
264 real,
dimension(:),
intent(in) :: T
266 real,
dimension(:),
intent(in) :: S
267 real,
dimension(:),
intent(in) :: pressure
268 real,
dimension(:),
intent(out) :: specvol
269 integer,
intent(in) :: start
270 integer,
intent(in) :: npts
271 type(EOS_type),
pointer :: EOS
272 real,
optional,
intent(in) :: spv_ref
273 real,
optional,
intent(in) :: scale
276 real,
dimension(size(specvol)) :: rho
279 if (.not.
associated(eos))
call mom_error(fatal, &
280 "calculate_spec_vol_array called with an unassociated EOS_type EOS.")
282 select case (eos%form_of_EOS)
284 call calculate_spec_vol_linear(t, s, pressure, specvol, start, npts, &
285 eos%rho_T0_S0, eos%drho_dT, eos%drho_dS, spv_ref)
287 call calculate_spec_vol_unesco(t, s, pressure, specvol, start, npts, spv_ref)
289 call calculate_spec_vol_wright(t, s, pressure, specvol, start, npts, spv_ref)
291 call calculate_spec_vol_teos10(t, s, pressure, specvol, start, npts, spv_ref)
293 call calculate_density_nemo (t, s, pressure, rho, start, npts)
294 if (
present(spv_ref))
then
295 specvol(:) = 1.0 / rho(:) - spv_ref
297 specvol(:) = 1.0 / rho(:)
300 call mom_error(fatal, &
301 "calculate_spec_vol_array: EOS%form_of_EOS is not valid.")
304 if (
present(scale))
then ;
if (scale /= 1.0)
then ;
do j=start,start+npts-1
305 specvol(j) = scale * specvol(j)
306 enddo ;
endif ;
endif
◆ calculate_spec_vol_scalar()
subroutine mom_eos::calculate_spec_vol::calculate_spec_vol_scalar |
( |
real, intent(in) |
T, |
|
|
real, intent(in) |
S, |
|
|
real, intent(in) |
pressure, |
|
|
real, intent(out) |
specvol, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
spv_ref, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs.
- Parameters
-
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | specvol | In situ? specific volume [m3 kg-1] or [R-1 ~> m3 kg-1] |
| eos | Equation of state structure |
[in] | spv_ref | A reference specific volume [m3 kg-1]. |
[in] | scale | A multiplicative factor by which to scale specific volume from m3 kg-1 to the desired units [kg m-3 R-1] |
Definition at line 218 of file MOM_EOS.F90.
218 real,
intent(in) :: T
219 real,
intent(in) :: S
220 real,
intent(in) :: pressure
221 real,
intent(out) :: specvol
222 type(EOS_type),
pointer :: EOS
223 real,
optional,
intent(in) :: spv_ref
224 real,
optional,
intent(in) :: scale
229 if (.not.
associated(eos))
call mom_error(fatal, &
230 "calculate_spec_vol_scalar called with an unassociated EOS_type EOS.")
232 select case (eos%form_of_EOS)
234 call calculate_spec_vol_linear(t, s, pressure, specvol, &
235 eos%rho_T0_S0, eos%drho_dT, eos%drho_dS, spv_ref)
237 call calculate_spec_vol_unesco(t, s, pressure, specvol, spv_ref)
239 call calculate_spec_vol_wright(t, s, pressure, specvol, spv_ref)
241 call calculate_spec_vol_teos10(t, s, pressure, specvol, spv_ref)
243 call calculate_density_nemo(t, s, pressure, rho)
244 if (
present(spv_ref))
then
245 specvol = 1.0 / rho - spv_ref
250 call mom_error(fatal, &
251 "calculate_spec_vol_scalar: EOS is not valid.")
254 if (
present(scale))
then ;
if (scale /= 1.0)
then
255 specvol = scale * specvol
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/equation_of_state/MOM_EOS.F90