Skip to content

Commit

Permalink
Merge pull request #726 from mgharamti/marbl-dart
Browse files Browse the repository at this point in the history
1D Ocean Column MARBL Interface + Obs Converter
  • Loading branch information
hkershaw-brown authored Sep 10, 2024
2 parents a85e162 + 7cc0bef commit 71d70e1
Show file tree
Hide file tree
Showing 21 changed files with 1,997 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ ssec_satwnd
gts_to_dart
littler_tf_dart
rad_3dvar_to_dart
bats_to_clim_obs
bats_to_obs
L1_AMSUA_to_netcdf
convert_airs_L2
convert_amsu_L1
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ individual files.

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

**September 10 2024:: MARBL_column. Tag 11.8.0**

- Interface for MARBL_column for DART:

- state estimation
- state and parameter estimation
- parameter estimation only

- BATS observation converter, and BATS climatology scripting

*contributed by Robin Armstrong*

Bugfix:

- fix for IO for NetCDF files when only some variables have the unlimited dimension

**August 29 2024 :: Bug fixes for shortest_time_between_assimilations and get_close_init. Tag 11.7.1**

Bug fixes:
Expand Down
21 changes: 12 additions & 9 deletions assimilation_code/modules/io/direct_netcdf_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module direct_netcdf_mod
get_index_start, get_index_end , get_num_dims, &
create_diagnostic_structure, &
end_diagnostic_structure, &
has_unlimited_dim
has_unlimited_dim, get_io_dim_ids

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

slice_start(:) = 1 ! default to read all dimensions start at 1

if (has_unlimited_dim(domain)) then

ret = nf90_inquire(ncfile_in, unlimitedDimID=unlim_dimID)
call nc_check(ret, 'read_variables: nf90_inquire', 'unlimitedDimID')

if (has_unlimited_dim(domain) .and. any(get_io_dim_ids(domain, i) == unlim_dimID )) then

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

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

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

if (has_unlimited_dim(domain)) then
ret = nf90_inquire(ncid, unlimitedDimID=unlim_dimID)
call nc_check(ret, 'read_variables: nf90_inquire', 'unlimitedDimID')

if (has_unlimited_dim(domain) .and. any(get_io_dim_ids(domain, i) == unlim_dimID )) then

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

! write the latest time slice - HK hack to get started with tiegcm
! not sure if it will always be the last time slice
ret = nf90_inquire(ncid, unlimitedDimID=unlim_dimID)
call nc_check(ret, 'write_variables: nf90_inquire', 'unlimitedDimID')

if (unlim_dimID /= -1) then ! unlimited dimension exists
ret = nf90_inquire_dimension(ncid, unlim_dimID, len=slice_start(num_dims))
call nc_check(ret, 'write_variables: nf90_inquire dimension', 'unlimitedDim length')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
! QTY_CWP_PATH_ZERO
! QTY_DISSOLVED_INORGANIC_CARBON
! QTY_DISSOLVED_INORGANIC_IRON
! QTY_DISSOLVED_INORGANIC_SIO3
! QTY_DISSOLVED_ORGANIC_CARBON
! QTY_DISSOLVED_ORGANIC_NITROGEN
! QTY_DISSOLVED_ORGANIC_P
! QTY_DISSOLVED_OXYGEN
Expand Down Expand Up @@ -158,6 +160,7 @@
! QTY_LANDMASK
! QTY_LARGE_SCALE_STATE desc="state varies with large time/space scale"
! QTY_LATENT_HEAT_FLUX
! QTY_LAYER_THICKNESS
! QTY_LEAF_AREA_INDEX
! QTY_LEAF_CARBON
! QTY_LEAF_NITROGEN
Expand All @@ -167,7 +170,9 @@
! QTY_LIVE_STEM_CARBON
! QTY_LIVE_STEM_NITROGEN
! QTY_MEAN_SOURCE
! QTY_MESOZOOPLANKTON_CARBON
! QTY_MICROWAVE_BRIGHT_TEMP
! QTY_MICROZOOPLANKTON_CARBON
! QTY_MINERAL_ACCUM
! QTY_MINERAL_COARSE
! QTY_MINERAL_NUCLEUS
Expand Down Expand Up @@ -382,6 +387,8 @@
! QTY_WIND_TURBINE_POWER
! QTY_W_CURRENT_COMPONENT
! QTY_X_LAMBDA
! QTY_COLUMN_DEPTH
! QTY_BGC_PARAM
!
! END DART PREPROCESS QUANTITY DEFINITIONS

Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@
! QTY_PHYTOPLANKTON_BIOMASS
! QTY_ALKALINITY
! QTY_DISSOLVED_INORGANIC_CARBON
! QTY_DISSOLVED_ORGANIC_CARBON
! QTY_DISSOLVED_ORGANIC_NITROGEN
! QTY_DISSOLVED_ORGANIC_P
! QTY_DISSOLVED_INORGANIC_IRON
! QTY_SURFACE_CHLOROPHYLL
! QTY_LAYER_THICKNESS
! QTY_COLUMN_DEPTH
! QTY_DISSOLVED_INORGANIC_SIO3
! QTY_MESOZOOPLANKTON_CARBON
! QTY_MICROZOOPLANKTON_CARBON
! QTY_BGC_PARAM
!
! ! fixme - these units are hardcoded in obs_diag and shouldn't be
! QTY_U_WIND_COMPONENT
Expand Down
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = 'Data Assimilation Research Section'

# The full version, including alpha/beta/rc tags
release = '11.7.1'
release = '11.8.0'
root_doc = 'index'

# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions guide/available-observation-converters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Each directory has at least one converter:
- ``AURA``: See ``DART/observations/obs_converters/AURA``
- ``Aviso+/CMEMS``: :doc:`../observations/obs_converters/AVISO/AVISO`
- ``Ameriflux``: :doc:`../observations/obs_converters/Ameriflux/level4_to_obs`
- ``BATS``: :doc:`../observations/obs_converters/BATS/readme`
- ``CHAMP``: :doc:`../observations/obs_converters/CHAMP/work/README`
- ``cice``: :doc:`../observations/obs_converters/cice/cice_to_obs`
- ``CNOFS``: See ``DART/observations/obs_converters/CNOFS``
Expand Down
2 changes: 2 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ References
observations/obs_converters/Ameriflux/fluxnetfull_to_obs
observations/obs_converters/Ameriflux/level4_to_obs
observations/obs_converters/CHAMP/work/README
observations/obs_converters/BATS/readme
observations/obs_converters/cice/cice_to_obs
observations/obs_converters/CONAGUA/README
observations/obs_converters/COSMOS/COSMOS_to_obs
Expand Down Expand Up @@ -466,6 +467,7 @@ References
models/lorenz_96_tracer_advection/readme
models/forced_lorenz_96/readme
models/MITgcm_ocean/readme
models/MARBL_column/readme
models/MOM6/readme
models/mpas_atm/readme
models/mpas_atm/mpas_dart_obs_preprocess
Expand Down
Loading

0 comments on commit 71d70e1

Please sign in to comment.