Skip to content

Commit 71d70e1

Browse files
Merge pull request #726 from mgharamti/marbl-dart
1D Ocean Column MARBL Interface + Obs Converter
2 parents a85e162 + 7cc0bef commit 71d70e1

File tree

21 files changed

+1997
-10
lines changed

21 files changed

+1997
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ ssec_satwnd
162162
gts_to_dart
163163
littler_tf_dart
164164
rad_3dvar_to_dart
165+
bats_to_clim_obs
166+
bats_to_obs
165167
L1_AMSUA_to_netcdf
166168
convert_airs_L2
167169
convert_amsu_L1

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ individual files.
2222

2323
The changes are now listed with the most recent at the top.
2424

25+
**September 10 2024:: MARBL_column. Tag 11.8.0**
26+
27+
- Interface for MARBL_column for DART:
28+
29+
- state estimation
30+
- state and parameter estimation
31+
- parameter estimation only
32+
33+
- BATS observation converter, and BATS climatology scripting
34+
35+
*contributed by Robin Armstrong*
36+
37+
Bugfix:
38+
39+
- fix for IO for NetCDF files when only some variables have the unlimited dimension
40+
2541
**August 29 2024 :: Bug fixes for shortest_time_between_assimilations and get_close_init. Tag 11.7.1**
2642

2743
Bug fixes:

assimilation_code/modules/io/direct_netcdf_mod.f90

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module direct_netcdf_mod
9393
get_index_start, get_index_end , get_num_dims, &
9494
create_diagnostic_structure, &
9595
end_diagnostic_structure, &
96-
has_unlimited_dim
96+
has_unlimited_dim, get_io_dim_ids
9797

9898
use io_filenames_mod, only : get_restart_filename, inherit_copy_units, &
9999
stage_metadata_type, get_file_description, &
@@ -858,16 +858,17 @@ subroutine read_variables(ncfile_in, var_block, start_var, end_var, domain)
858858
counts(:) = 1
859859

860860
slice_start(:) = 1 ! default to read all dimensions start at 1
861-
862-
if (has_unlimited_dim(domain)) then
861+
862+
ret = nf90_inquire(ncfile_in, unlimitedDimID=unlim_dimID)
863+
call nc_check(ret, 'read_variables: nf90_inquire', 'unlimitedDimID')
864+
865+
if (has_unlimited_dim(domain) .and. any(get_io_dim_ids(domain, i) == unlim_dimID )) then
863866

864867
counts(num_dims) = 1 ! one slice of unlimited dimesion
865-
counts(1:num_dims-1) = get_dim_lengths(domain, i) ! the state
868+
counts(1:get_num_dims(domain, i)) = get_dim_lengths(domain, i) ! the state
866869

867870
! read latest time slice - hack to get started with tiegcm
868871
! not sure if it will always be the last time slice
869-
ret = nf90_inquire(ncfile_in, unlimitedDimID=unlim_dimID)
870-
call nc_check(ret, 'read_variables: nf90_inquire', 'unlimitedDimID')
871872

872873
if (unlim_dimID /= -1) then ! unlimited dimension exists
873874
ret = nf90_inquire_dimension(ncfile_in, unlim_dimID, len=slice_start(num_dims))
@@ -1588,15 +1589,17 @@ subroutine write_variables(ncid, var_block, start_var, end_var, domain, &
15881589
slice_start(:) = 1 ! default to read all dimensions starting at 1
15891590
counts(:) = 1
15901591

1591-
if (has_unlimited_dim(domain)) then
1592+
ret = nf90_inquire(ncid, unlimitedDimID=unlim_dimID)
1593+
call nc_check(ret, 'read_variables: nf90_inquire', 'unlimitedDimID')
1594+
1595+
if (has_unlimited_dim(domain) .and. any(get_io_dim_ids(domain, i) == unlim_dimID )) then
15921596

15931597
counts(num_dims) = 1 ! one slice of unlimited dimesion
15941598
counts(1:get_num_dims(domain, i)) = get_dim_lengths(domain, i)
15951599

15961600
! write the latest time slice - HK hack to get started with tiegcm
15971601
! not sure if it will always be the last time slice
1598-
ret = nf90_inquire(ncid, unlimitedDimID=unlim_dimID)
1599-
call nc_check(ret, 'write_variables: nf90_inquire', 'unlimitedDimID')
1602+
16001603
if (unlim_dimID /= -1) then ! unlimited dimension exists
16011604
ret = nf90_inquire_dimension(ncid, unlim_dimID, len=slice_start(num_dims))
16021605
call nc_check(ret, 'write_variables: nf90_inquire dimension', 'unlimitedDim length')

assimilation_code/modules/observations/default_quantities_mod.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
! QTY_CWP_PATH_ZERO
7373
! QTY_DISSOLVED_INORGANIC_CARBON
7474
! QTY_DISSOLVED_INORGANIC_IRON
75+
! QTY_DISSOLVED_INORGANIC_SIO3
76+
! QTY_DISSOLVED_ORGANIC_CARBON
7577
! QTY_DISSOLVED_ORGANIC_NITROGEN
7678
! QTY_DISSOLVED_ORGANIC_P
7779
! QTY_DISSOLVED_OXYGEN
@@ -158,6 +160,7 @@
158160
! QTY_LANDMASK
159161
! QTY_LARGE_SCALE_STATE desc="state varies with large time/space scale"
160162
! QTY_LATENT_HEAT_FLUX
163+
! QTY_LAYER_THICKNESS
161164
! QTY_LEAF_AREA_INDEX
162165
! QTY_LEAF_CARBON
163166
! QTY_LEAF_NITROGEN
@@ -167,7 +170,9 @@
167170
! QTY_LIVE_STEM_CARBON
168171
! QTY_LIVE_STEM_NITROGEN
169172
! QTY_MEAN_SOURCE
173+
! QTY_MESOZOOPLANKTON_CARBON
170174
! QTY_MICROWAVE_BRIGHT_TEMP
175+
! QTY_MICROZOOPLANKTON_CARBON
171176
! QTY_MINERAL_ACCUM
172177
! QTY_MINERAL_COARSE
173178
! QTY_MINERAL_NUCLEUS
@@ -382,6 +387,8 @@
382387
! QTY_WIND_TURBINE_POWER
383388
! QTY_W_CURRENT_COMPONENT
384389
! QTY_X_LAMBDA
390+
! QTY_COLUMN_DEPTH
391+
! QTY_BGC_PARAM
385392
!
386393
! END DART PREPROCESS QUANTITY DEFINITIONS
387394

assimilation_code/modules/observations/ocean_quantities_mod.f90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@
3232
! QTY_PHYTOPLANKTON_BIOMASS
3333
! QTY_ALKALINITY
3434
! QTY_DISSOLVED_INORGANIC_CARBON
35+
! QTY_DISSOLVED_ORGANIC_CARBON
3536
! QTY_DISSOLVED_ORGANIC_NITROGEN
3637
! QTY_DISSOLVED_ORGANIC_P
3738
! QTY_DISSOLVED_INORGANIC_IRON
3839
! QTY_SURFACE_CHLOROPHYLL
3940
! QTY_LAYER_THICKNESS
41+
! QTY_COLUMN_DEPTH
42+
! QTY_DISSOLVED_INORGANIC_SIO3
43+
! QTY_MESOZOOPLANKTON_CARBON
44+
! QTY_MICROZOOPLANKTON_CARBON
45+
! QTY_BGC_PARAM
4046
!
4147
! ! fixme - these units are hardcoded in obs_diag and shouldn't be
4248
! QTY_U_WIND_COMPONENT

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
author = 'Data Assimilation Research Section'
2222

2323
# The full version, including alpha/beta/rc tags
24-
release = '11.7.1'
24+
release = '11.8.0'
2525
root_doc = 'index'
2626

2727
# -- General configuration ---------------------------------------------------

guide/available-observation-converters.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Each directory has at least one converter:
1111
- ``AURA``: See ``DART/observations/obs_converters/AURA``
1212
- ``Aviso+/CMEMS``: :doc:`../observations/obs_converters/AVISO/AVISO`
1313
- ``Ameriflux``: :doc:`../observations/obs_converters/Ameriflux/level4_to_obs`
14+
- ``BATS``: :doc:`../observations/obs_converters/BATS/readme`
1415
- ``CHAMP``: :doc:`../observations/obs_converters/CHAMP/work/README`
1516
- ``cice``: :doc:`../observations/obs_converters/cice/cice_to_obs`
1617
- ``CNOFS``: See ``DART/observations/obs_converters/CNOFS``

index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ References
361361
observations/obs_converters/Ameriflux/fluxnetfull_to_obs
362362
observations/obs_converters/Ameriflux/level4_to_obs
363363
observations/obs_converters/CHAMP/work/README
364+
observations/obs_converters/BATS/readme
364365
observations/obs_converters/cice/cice_to_obs
365366
observations/obs_converters/CONAGUA/README
366367
observations/obs_converters/COSMOS/COSMOS_to_obs
@@ -466,6 +467,7 @@ References
466467
models/lorenz_96_tracer_advection/readme
467468
models/forced_lorenz_96/readme
468469
models/MITgcm_ocean/readme
470+
models/MARBL_column/readme
469471
models/MOM6/readme
470472
models/mpas_atm/readme
471473
models/mpas_atm/mpas_dart_obs_preprocess

0 commit comments

Comments
 (0)