Skip to content

Commit a668a5b

Browse files
authored
using a gotm.yaml provided variable - fixed_grid - to allow for non-time varying z, zi
1 parent 3201d8f commit a668a5b

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/gotm/gotm.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module gotm
8383
use gotm_fabm, only: fabm_airp, fabm_calendar_date, fabm_julianday
8484
use gotm_fabm_input,only: configure_gotm_fabm_input, init_gotm_fabm_input
8585
#endif
86+
use register_all_variables,only: fixed_grid
8687

8788
IMPLICIT NONE
8889
private
@@ -273,6 +274,9 @@ subroutine initialize_gotm()
273274
minimum=0._rk, default=0._rk)
274275
call branch%get(grid_file, 'file', 'path to file with layer thicknesses', &
275276
default='')
277+
call branch%get(fixed_grid, 'fixed_grid', &
278+
'whether the vertical grid is fixed in time (enables static z coordinate in output)', &
279+
default=.false.)
276280
#if 0
277281
twig => branch%get_child('adaptation')
278282
call twig%get(c1ad, 'c1ad', 'weighting factor for buoyancy frequency', '-', &

src/gotm/register_all_variables.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module register_all_variables
2121
!
2222
! !PUBLIC DATA MEMBERS:
2323
type (type_field_manager), public, target :: fm
24+
logical, public :: fixed_grid
2425
!
2526
! !REVISION HISTORY:
2627
! Original author(s): Karsten Bolding & Jorn Bruggeman
@@ -472,10 +473,10 @@ subroutine register_meanflow_variables(nlev)
472473
call fm%register('Af', 'm^2', 'hypsograph at grid interfaces', standard_name='??', dimensions=(/id_dim_z/), data1d=Af(1:nlev), category='column_structure')
473474
end if
474475
#endif
475-
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)
476+
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)
476477
call field%attributes%set('positive', 'up')
477478
call field%attributes%set('axis', 'Z')
478-
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)
479+
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)
479480
call field%attributes%set('positive', 'up')
480481
call field%attributes%set('axis', 'Z')
481482
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.)

0 commit comments

Comments
 (0)