Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/gotm/gotm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module gotm
REALTYPE :: ssf=_ZERO_ ! surface salinity flux

integer(kind=timestepkind):: progress
logical :: fixed_grid
!-----------------------------------------------------------------------

contains
Expand Down Expand Up @@ -464,6 +465,7 @@ subroutine initialize_gotm()
! However, before that happens, it is already used in updategrid.
! therefore, we set to to a reasonable default here.
w_adv_input%method = 0
fixed_grid = (zeta_input%method == 0) .and. (ice_model == 0)

restart = restart_online .or. restart_offline
if (restart_online) restart_offline = .false.
Expand Down Expand Up @@ -583,7 +585,7 @@ subroutine initialize_gotm()
call post_init_seagrass(nlev)
#endif

call do_register_all_variables(latitude,longitude,nlev)
call do_register_all_variables(latitude,longitude,fixed_grid,nlev)

! initialize FABM module
#ifdef _FABM_
Expand Down
12 changes: 7 additions & 5 deletions src/gotm/register_all_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module register_all_variables
! !ROUTINE: do_register_all_variables
!
! !INTERFACE:
subroutine do_register_all_variables(lat,lon,nlev)
subroutine do_register_all_variables(lat,lon,fixed_grid,nlev)
!
! !USES:
IMPLICIT NONE
Expand All @@ -47,6 +47,7 @@ subroutine do_register_all_variables(lat,lon,nlev)
!
! !INPUT PARAMETERS:
REALTYPE, intent(in) :: lat,lon
logical, intent(in) :: fixed_grid
integer, intent(in) :: nlev
!
! !REVISION HISTORY:
Expand All @@ -59,7 +60,7 @@ subroutine do_register_all_variables(lat,lon,nlev)
LEVEL1 'register_all_variables()'
call register_coordinate_variables(lat,lon)
call register_density_variables(nlev)
call register_meanflow_variables(nlev)
call register_meanflow_variables(fixed_grid,nlev)
#ifdef _SEAGRASS_
call register_seagrass_variables(nlev)
#endif
Expand Down Expand Up @@ -411,7 +412,7 @@ end subroutine register_density_variables
! !IROUTINE: meanflow variable registration
!
! !INTERFACE:
subroutine register_meanflow_variables(nlev)
subroutine register_meanflow_variables(fixed_grid,nlev)
!
! !DESCRIPTION:
!
Expand All @@ -422,6 +423,7 @@ subroutine register_meanflow_variables(nlev)
IMPLICIT NONE
!
! !INPUT PARAMETERS:
logical, intent(in) :: fixed_grid
integer, intent(in) :: nlev
type (type_field), pointer :: field
!
Expand Down Expand Up @@ -472,10 +474,10 @@ subroutine register_meanflow_variables(nlev)
call fm%register('Af', 'm^2', 'hypsograph at grid interfaces', standard_name='??', dimensions=(/id_dim_z/), data1d=Af(1:nlev), category='column_structure')
end if
#endif
call fm%register('z', 'm', 'depth (center)', standard_name='??', dimensions=(/id_dim_z/), data1d=z(1:nlev), coordinate_dimension=id_dim_z,category='column_structure',field=field)
call fm%register('z', 'm', 'depth (center)', standard_name='??', dimensions=(/id_dim_z/), no_default_dimensions=fixed_grid, data1d=z(1:nlev), coordinate_dimension=id_dim_z,category='column_structure',field=field)
call field%attributes%set('positive', 'up')
call field%attributes%set('axis', 'Z')
call fm%register('zi', 'm', 'depth (interface)', standard_name='??', dimensions=(/id_dim_zi/), data1d=zi(0:nlev), coordinate_dimension=id_dim_zi,category='column_structure',field=field)
call fm%register('zi', 'm', 'depth (interface)', standard_name='??', dimensions=(/id_dim_zi/), no_default_dimensions=fixed_grid, data1d=zi(0:nlev), coordinate_dimension=id_dim_zi,category='column_structure',field=field)
call field%attributes%set('positive', 'up')
call field%attributes%set('axis', 'Z')
call fm%register('h', 'm', 'layer thickness', standard_name='cell_thickness', dimensions=(/id_dim_z/), data1d=h(1:nlev),category='column_structure',part_of_state=.true.)
Expand Down