My Project
Data Types | Functions/Subroutines
eqs_of_state Module Reference

Data Types

interface  dens2g
 
interface  fofonoff_millard
 
interface  jacket_mcdougall
 

Functions/Subroutines

subroutine dens1
 
subroutine dens2
 
subroutine dens3
 

Function/Subroutine Documentation

◆ dens1()

subroutine eqs_of_state::dens1 ( )

Definition at line 229 of file eqs_of_state.f90.

229 
230  !------------------------------------------------------------------------------|
231  IMPLICIT NONE
232  INTEGER :: K
233  REAL(SP), PARAMETER ::PR = 0.0_sp
234  REAL(SP), DIMENSION(0:MT,1:KB) :: RZU
235  !==============================================================================|
236  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "START: DENS1"
237 
238  ! The thickness of the water column
239  ! Is not the depth realtive to z=0
240  DO k=1,kbm1
241  rzu(:,k) = -grav_n*1.025_sp*(zz(:,k)*d(:))*0.1_sp
242  END DO
243 
244  CALL fofonoff_millard_2d(s1,t1,rzu,pr,rho1)
245  rho1(:,kb)=0.0_sp
246  rho1(0,:)=0.0_sp
247 
248 
249  !----------------TRANSFORM TO FACE CENTER--------------------------------------
250 
251  CALL n2e3d(rho1,rho)
252 
253  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "END: DENS1"
254  RETURN
real(sp), dimension(:), allocatable, target d
Definition: mod_main.f90:1132
logical function dbg_set(vrb)
Definition: mod_utils.f90:182
real(sp), dimension(:,:), allocatable, target rho1
Definition: mod_main.f90:1309
real(sp), dimension(:,:), allocatable, target t1
Definition: mod_main.f90:1307
real(sp), dimension(:,:), allocatable, target rho
Definition: mod_main.f90:1284
real(sp), dimension(:,:), allocatable, target s1
Definition: mod_main.f90:1308
integer kb
Definition: mod_main.f90:64
real(sp), dimension(:), allocatable, target grav_n
Definition: mod_main.f90:1013
subroutine n2e3d(NVAR, EVAR)
Definition: mod_main.f90:1370
integer ipt
Definition: mod_main.f90:922
integer, parameter dbg_sbr
Definition: mod_utils.f90:69
integer kbm1
Definition: mod_main.f90:65
real(sp), dimension(:,:), allocatable, target zz
Definition: mod_main.f90:1091
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dens2()

subroutine eqs_of_state::dens2 ( )

Definition at line 393 of file eqs_of_state.f90.

393 
394  !==============================================================================|
395  IMPLICIT NONE
396  !==============================================================================|
397  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "START: DENS2"
398 
399  !
400  ! CALCULATE DENSITY FROM EQUATION OF STATE
401  !
402  CALL dens2_2d(s1,t1,rho1)
403  rho1(:,kb)=0.0_sp
404  rho1(0,:)=0.0_sp
405 
406 
407  !
408  ! AVERAGE FROM NODES TO FACE CENTERS
409  !
410  CALL n2e3d(rho1,rho)
411 
412  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "END: DENS2"
413  RETURN
logical function dbg_set(vrb)
Definition: mod_utils.f90:182
real(sp), dimension(:,:), allocatable, target rho1
Definition: mod_main.f90:1309
real(sp), dimension(:,:), allocatable, target t1
Definition: mod_main.f90:1307
real(sp), dimension(:,:), allocatable, target rho
Definition: mod_main.f90:1284
real(sp), dimension(:,:), allocatable, target s1
Definition: mod_main.f90:1308
integer kb
Definition: mod_main.f90:64
subroutine n2e3d(NVAR, EVAR)
Definition: mod_main.f90:1370
integer ipt
Definition: mod_main.f90:922
integer, parameter dbg_sbr
Definition: mod_utils.f90:69
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dens3()

subroutine eqs_of_state::dens3 ( )

Definition at line 688 of file eqs_of_state.f90.

688 !==============================================================================|
689  IMPLICIT NONE
690  REAL(SP), DIMENSION(0:MT,KB) :: MYP
691  INTEGER :: K
692 
693  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "START: DENS3"
694 
695  DO k=1,kbm1
696  myp(:,k) = -grav_n(:)*1.025_sp*zz(:,k)*d(:) *0.01_sp
697  END DO
698 
699  CALL jacket_mcdougall_2d(s1,t1,myp,rho1)
700  rho1(:,kb)=0.0_sp
701  rho1(0,:)=0.0_sp
702 
703  !
704  ! AVERAGE FROM NODES TO FACE CENTERS
705  !
706  CALL n2e3d(rho1,rho)
707 
708  IF(dbg_set(dbg_sbr)) WRITE(ipt,*) "END: DENS3"
709  RETURN
real(sp), dimension(:), allocatable, target d
Definition: mod_main.f90:1132
logical function dbg_set(vrb)
Definition: mod_utils.f90:182
real(sp), dimension(:,:), allocatable, target rho1
Definition: mod_main.f90:1309
real(sp), dimension(:,:), allocatable, target t1
Definition: mod_main.f90:1307
real(sp), dimension(:,:), allocatable, target rho
Definition: mod_main.f90:1284
real(sp), dimension(:,:), allocatable, target s1
Definition: mod_main.f90:1308
integer kb
Definition: mod_main.f90:64
real(sp), dimension(:), allocatable, target grav_n
Definition: mod_main.f90:1013
subroutine n2e3d(NVAR, EVAR)
Definition: mod_main.f90:1370
integer ipt
Definition: mod_main.f90:922
integer, parameter dbg_sbr
Definition: mod_utils.f90:69
integer kbm1
Definition: mod_main.f90:65
real(sp), dimension(:,:), allocatable, target zz
Definition: mod_main.f90:1091
Here is the call graph for this function:
Here is the caller graph for this function: