6 implicit none ;
private 19 real,
allocatable,
dimension(:) :: coordinateresolution
29 integer,
intent(in) :: nk
30 real,
dimension(:),
intent(in) :: coordinateResolution
32 if (
associated(cs))
call mom_error(fatal,
"init_coord_sigma: CS already associated!")
34 allocate(cs%coordinateResolution(nk))
37 cs%coordinateResolution = coordinateresolution
44 if (.not.
associated(cs))
return 45 deallocate(cs%coordinateResolution)
51 real,
optional,
intent(in) :: min_thickness
53 if (.not.
associated(cs))
call mom_error(fatal,
"set_sigma_params: CS not associated")
55 if (
present(min_thickness)) cs%min_thickness = min_thickness
62 integer,
intent(in) :: nz
63 real,
intent(in) :: depth
64 real,
intent(in) :: totalThickness
65 real,
dimension(nz+1),
intent(inout) :: zInterface
70 zinterface(nz+1) = -depth
72 zinterface(k) = zinterface(k+1) + (totalthickness * cs%coordinateResolution(k))
75 if (zinterface(k) < (zinterface(k+1) + cs%min_thickness))
then 76 zinterface(k) = zinterface(k+1) + cs%min_thickness
subroutine, public init_coord_sigma(CS, nk, coordinateResolution)
Initialise a sigma_CS with pointers to parameters.
Control structure containing required parameters for the sigma coordinate.
subroutine, public set_sigma_params(CS, min_thickness)
Regrid columns for the sigma coordinate.
subroutine, public end_coord_sigma(CS)
subroutine, public mom_error(level, message, all_print)
subroutine, public build_sigma_column(CS, nz, depth, totalThickness, zInterface)
Build a sigma coordinate column.