Skip to content

Commit

Permalink
Merge pull request #98 from Hallberg-NOAA/restructure_dynamics
Browse files Browse the repository at this point in the history
+Restructure SIS2 dynamics calls
  • Loading branch information
Hallberg-NOAA authored Feb 28, 2019
2 parents 12a290b + 3d718e8 commit fd49919
Show file tree
Hide file tree
Showing 30 changed files with 3,439 additions and 2,364 deletions.
577 changes: 286 additions & 291 deletions src/SIS2_ice_thm.F90

Large diffs are not rendered by default.

717 changes: 634 additions & 83 deletions src/SIS_continuity.F90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/SIS_ctrl_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ subroutine ice_diagnostics_init(IOF, OSS, FIA, G, IG, diag, Time, Cgrid)
!! sea ice velocities. The default is true.

real, dimension(G%isc:G%iec,G%jsc:G%jec) :: tmp_diag ! A temporary diagnostic array
real :: I_area_Earth ! The inverse of the area of the sphere, in m-2.
real :: I_area_Earth ! The inverse of the area of the sphere [m-2].
real, parameter :: missing = -1e34 ! The fill value for missing data.
integer :: id_geo_lon, id_geo_lat, id_sin_rot, id_cos_rot, id_cell_area
logical :: Cgrid_dyn
Expand Down
6 changes: 0 additions & 6 deletions src/SIS_debugging.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ subroutine check_redundant_vC3d(mesg, u_comp, v_comp, G, is, ie, js, je, &
integer, optional, intent(in) :: js !< The starting j-index to work on
integer, optional, intent(in) :: je !< The ending j-index to work on
integer, optional, intent(in) :: direction !< The direction flag to pass to pass_vector
! Arguments: u_comp - The u-component of the vector being checked.
! (in) v_comp - The v-component of the vector being checked.
! (in) mesg - A message indicating what is being checked.
! (in) G - The ocean's grid structure.
! (in/opt) is, ie, js, je - the i- and j- range of indices to check.
! (in/opt) direction - the direction flag to be passed to pass_vector.

character(len=24) :: mesg_k
integer :: k
Expand Down
6 changes: 3 additions & 3 deletions src/SIS_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ end subroutine post_data_3d

!> Enable the accumulation of time averages over the specified time interval.
subroutine enable_SIS_averaging(time_int_in, time_end_in, diag_cs)
real, intent(in) :: time_int_in !< The time interval in s over which any
! !! values that are offered are valid.
real, intent(in) :: time_int_in !< The time interval over which any values
! !! that are offered are valid [s].
type(time_type), intent(in) :: time_end_in !< The end time of the valid interval.
type(SIS_diag_ctrl), intent(inout) :: diag_cs !< A structure that is used to regulate diagnostic output
! This subroutine enables the accumulation of time averages over the
Expand All @@ -503,7 +503,7 @@ end subroutine disable_SIS_averaging
!> Indicate whether averaging diagnostics is currently enabled
logical function query_SIS_averaging_enabled(diag_cs, time_int, time_end)
type(SIS_diag_ctrl), intent(in) :: diag_cs !< A structure that is used to regulate diagnostic output
real, optional, intent(out) :: time_int !< The current setting of diag_cs%time_int, in s.
real, optional, intent(out) :: time_int !< The current setting of diag_cs%time_int [s].
type(time_type), optional, intent(out) :: time_end !< The current setting of diag_cs%time_end.

if (present(time_int)) time_int = diag_cs%time_int
Expand Down
151 changes: 59 additions & 92 deletions src/SIS_dyn_bgrid.F90

Large diffs are not rendered by default.

315 changes: 141 additions & 174 deletions src/SIS_dyn_cgrid.F90

Large diffs are not rendered by default.

1,263 changes: 858 additions & 405 deletions src/SIS_dyn_trans.F90

Large diffs are not rendered by default.

145 changes: 72 additions & 73 deletions src/SIS_fast_thermo.F90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/SIS_fixed_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ subroutine SIS_initialize_fixed(G, PF, write_geom, output_dir)


! Calculate the value of the Coriolis parameter at the latitude !
! of the q grid points, in s-1.
! of the q grid points [s-1].
call MOM_initialize_rotation(G%CoriolisBu, G, PF)
! Calculate the components of grad f (beta)
call MOM_calculate_grad_Coriolis(G%dF_dx, G%dF_dy, G)
Expand Down
70 changes: 35 additions & 35 deletions src/SIS_hor_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ module SIS_hor_grid
!! during the course of the run via calls to set_first_direction.

real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: &
mask2dT, & !< 0 for land points and 1 for ocean points on the h-grid. Nd.
mask2dT, & !< 0 for land points and 1 for ocean points on the h-grid [nondim].
geoLatT, & !< The geographic latitude at q points in degrees of latitude or m.
geoLonT, & !< The geographic longitude at q points in degrees of longitude or m.
dxT, & !< dxT is delta x at h points, in m.
IdxT, & !< 1/dxT in m-1.
dyT, & !< dyT is delta y at h points, in m, and IdyT is 1/dyT in m-1.
IdyT, & !< dyT is delta y at h points, in m, and IdyT is 1/dyT in m-1.
areaT, & !< The area of an h-cell, in m2.
IareaT !< 1/areaT, in m-2.
dxT, & !< dxT is delta x at h points [m].
IdxT, & !< 1/dxT [m-1].
dyT, & !< dyT is delta y at h points [m], and IdyT is 1/dyT [m-1].
IdyT, & !< dyT is delta y at h points [m], and IdyT is 1/dyT [m-1].
areaT, & !< The area of an h-cell [m2].
IareaT !< 1/areaT [m-2].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: sin_rot
!< The sine of the angular rotation between the local model grid northward
!! and the true northward directions.
Expand All @@ -89,39 +89,39 @@ module SIS_hor_grid
!! and the true northward directions.

real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEM_) :: &
mask2dCu, & !< 0 for boundary points and 1 for ocean points on the u grid. Nondim.
mask2dCu, & !< 0 for boundary points and 1 for ocean points on the u grid [nondim].
geoLatCu, & !< The geographic latitude at u points in degrees of latitude or m.
geoLonCu, & !< The geographic longitude at u points in degrees of longitude or m.
dxCu, & !< dxCu is delta x at u points, in m.
IdxCu, & !< 1/dxCu in m-1.
dyCu, & !< dyCu is delta y at u points, in m.
IdyCu, & !< 1/dyCu in m-1.
dxCu, & !< dxCu is delta x at u points [m].
IdxCu, & !< 1/dxCu [m-1].
dyCu, & !< dyCu is delta y at u points [m].
IdyCu, & !< 1/dyCu [m-1].
dy_Cu, & !< The unblocked lengths of the u-faces of the h-cell in m.
IareaCu, & !< The masked inverse areas of u-grid cells in m2.
areaCu !< The areas of the u-grid cells in m2.
IareaCu, & !< The masked inverse areas of u-grid cells [m2].
areaCu !< The areas of the u-grid cells [m2].

real ALLOCABLE_, dimension(NIMEM_,NJMEMB_PTR_) :: &
mask2dCv, & !< 0 for boundary points and 1 for ocean points on the v grid. Nondim.
mask2dCv, & !< 0 for boundary points and 1 for ocean points on the v grid [nondim].
geoLatCv, & !< The geographic latitude at v points in degrees of latitude or m.
geoLonCv, & !< The geographic longitude at v points in degrees of longitude or m.
dxCv, & !< dxCv is delta x at v points, in m.
IdxCv, & !< 1/dxCv in m-1.
dyCv, & !< dyCv is delta y at v points, in m.
IdyCv, & !< 1/dyCv in m-1.
dxCv, & !< dxCv is delta x at v points [m].
IdxCv, & !< 1/dxCv [m-1].
dyCv, & !< dyCv is delta y at v points [m].
IdyCv, & !< 1/dyCv [m-1].
dx_Cv, & !< The unblocked lengths of the v-faces of the h-cell in m.
IareaCv, & !< The masked inverse areas of v-grid cells in m2.
areaCv !< The areas of the v-grid cells in m2.
IareaCv, & !< The masked inverse areas of v-grid cells [m2].
areaCv !< The areas of the v-grid cells [m2].

real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEMB_PTR_) :: &
mask2dBu, & !< 0 for boundary points and 1 for ocean points on the q grid. Nondim.
mask2dBu, & !< 0 for boundary points and 1 for ocean points on the q grid [nondim].
geoLatBu, & !< The geographic latitude at q points in degrees of latitude or m.
geoLonBu, & !< The geographic longitude at q points in degrees of longitude or m.
dxBu, & !< dxBu is delta x at q points, in m.
IdxBu, & !< 1/dxBu in m-1.
dyBu, & !< dyBu is delta y at q points, in m.
IdyBu, & !< 1/dyBu in m-1.
areaBu, & !< areaBu is the area of a q-cell, in m2
IareaBu !< IareaBu = 1/areaBu in m-2.
dxBu, & !< dxBu is delta x at q points [m].
IdxBu, & !< 1/dxBu [m-1].
dyBu, & !< dyBu is delta y at q points [m].
IdyBu, & !< 1/dyBu [m-1].
areaBu, & !< areaBu is the area of a q-cell [m2]
IareaBu !< IareaBu = 1/areaBu [m-2].

real, pointer, dimension(:) :: gridLatT => NULL()
!< The latitude of T points for the purpose of labeling the output axes.
Expand All @@ -141,13 +141,13 @@ module SIS_hor_grid
! Except on a Cartesian grid, these are usually some variant of "degrees".

real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: &
bathyT !< Ocean bottom depth at tracer points, in m.
bathyT !< Ocean bottom depth at tracer points [m].
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEMB_PTR_) :: &
CoriolisBu !< The Coriolis parameter at corner points, in s-1.
CoriolisBu !< The Coriolis parameter at corner points [s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: &
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points, in s-1 m-1.
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points, in s-1 m-1.
real :: g_Earth !< The gravitational acceleration in m s-2.
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [s-1 m-1].
real :: g_Earth !< The gravitational acceleration [m s-2].

! These variables are for block structures.
integer :: nblocks !< The number of sub-PE blocks on this PE
Expand All @@ -159,8 +159,8 @@ module SIS_hor_grid
real :: west_lon !< The longitude (or x-coordinate) of the first u-line
real :: len_lat = 0. !< The latitudinal (or y-coord) extent of physical domain
real :: len_lon = 0. !< The longitudinal (or x-coord) extent of physical domain
real :: Rad_Earth = 6.378e6 !< The radius of the planet in meters.
real :: max_depth !< The maximum depth of the ocean in meters.
real :: Rad_Earth = 6.378e6 !< The radius of the planet [m].
real :: max_depth !< The maximum depth of the ocean [m].
end type SIS_hor_grid_type

contains
Expand Down
Loading

0 comments on commit fd49919

Please sign in to comment.