Skip to content

fix: vtec extrapolation calculation in TIEGCM #852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025
Merged
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
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ individual files.

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

**May 1 2025 :: Bug-fixes: TIEGCM, BNRH. Tag v11.10.9**

- Fix VTEC extrapolation calculation in TIEGCM model_mod.
- Fix loop limit in bnrh_distribution_mod, and routine name in error messages.
- Documentation fix for perturb_single_instance.

**April 22 2025 :: Bug-fix: CICE interpolation. Tag v11.10.8**

- Inverse distance weighting interpolation for CICE. Replaces
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.10.8'
release = '11.10.9'
root_doc = 'index'

# -- General configuration ---------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions models/tiegcm/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
! - Nick Dietrich fix_mmr. When do to this?
! - model_time
! - get_state_meta_data 2D variables
! - test vtec

module model_mod

Expand Down Expand Up @@ -379,9 +378,9 @@ subroutine model_interpolate(state_handle, ens_size, location, iqty, obs_val, is
if ( iqty == QTY_VERTICAL_TEC ) then ! extrapolate vtec

call extrapolate_vtec(state_handle, ens_size, lon_below, lat_below, val11)
call extrapolate_vtec(state_handle, ens_size, lon_below, lat_above, val11)
call extrapolate_vtec(state_handle, ens_size, lon_above, lat_below, val11)
call extrapolate_vtec(state_handle, ens_size, lon_above, lat_above, val11)
call extrapolate_vtec(state_handle, ens_size, lon_below, lat_above, val12)
call extrapolate_vtec(state_handle, ens_size, lon_above, lat_below, val21)
call extrapolate_vtec(state_handle, ens_size, lon_above, lat_above, val22)
obs_val(:) = interpolate(ens_size, lon_fract, lat_fract, val11, val12, val21, val22)
istatus(:) = 0

Expand Down Expand Up @@ -1111,7 +1110,7 @@ subroutine extrapolate_vtec(state_handle, ens_size, lon_index, lat_index, vTEC)
! ZG (interfaces)
do i = 1, nilev
idx = get_dart_vector_index(lon_index,lat_index, i, &
domain_id(RESTART_DOM), var_id)
domain_id(SECONDARY_DOM), ivarZG)
ZG(i, :) = get_state(idx, state_handle)
enddo

Expand All @@ -1135,6 +1134,7 @@ subroutine extrapolate_vtec(state_handle, ens_size, lon_index, lat_index, vTEC)

earth_radiusm = earth_radius * 1000.0_r8 ! Convert earth_radius in km to m
NE = NE * 1.0e+6_r8 ! Convert NE in #/cm^3 to #/m^3
ZG = ZG * 1.0e-2_r8 ! Convert ZG in cm to m

! Gravity at the top layer
GRAVITYtop(:) = gravity * (earth_radiusm / (earth_radiusm + ZG(nilev,:))) ** 2
Expand Down