Skip to content

Add the 3DIAU capability for regional HAFS#399

Merged
vithikashah001 merged 51 commits into
NOAA-GFDL:dev/emcfrom
hafs-community:feature/hafsv2_sync
Feb 12, 2026
Merged

Add the 3DIAU capability for regional HAFS#399
vithikashah001 merged 51 commits into
NOAA-GFDL:dev/emcfrom
hafs-community:feature/hafsv2_sync

Conversation

@XuLu-NOAA
Copy link
Copy Markdown

Description
The current IAU implementation in FV3 is designed primarily for global applications. When used in regional HAFS configurations, the default behavior is insufficient because it does not read regional increment files or apply region-specific IAU weighting. This limits the applicability of IAU in regional HAFS workflows.

This request introduces several enhancements to support IAU in regional FV3/HAFS configurations without affecting global usage:

  1. iau_regional namelist option:
    Adds support for reading regional increment files during the IAU procedure.
  2. iau_inc_scale namelist option:
    Provides a user-defined scaling factor to adjust the IAU weighting specifically for regional HAFS applications.
  3. Bug fix for nint usage in computing nstep and kstep:
    Corrects the time-step indexing to ensure consistent and accurate IAU weighting.
    All new capabilities are optional and do not modify or interfere with existing global IAU functionality.

Fixes # (issue)
#398

wramstrom and others added 30 commits April 15, 2022 21:13
output (fort.602, the partial atcf track file).
…nt from set_regional_BCs in fv_regional_bc.F90
…tialized elements of qin array

Input array qin in a2b_ord2 routine is declared as qin(is-ng:ie+ng,js-ng:je+ng) but only elements in
(is-1:ie+1, js-1:je+1) range are initialized in a calling routine, for example pin array in adv_pe routine in dyn_core.F90
Comment thread tools/cubed_sphere_inc_mod.F90 Outdated
Comment on lines +44 to +68
if ( open_file(fileobj_regional, trim(fname), 'read') ) then
! Read increments
call read_data(fileobj_regional, 'u_inc', tmp)
increment_data%ua_inc=tmp(is:ie,js:je,:)
call read_data(fileobj_regional, 'v_inc', tmp)
increment_data%va_inc=tmp(is:ie,js:je,:)
call read_data(fileobj_regional, 'T_inc', tmp)
increment_data%temp_inc=tmp(is:ie,js:je,:)
call read_data(fileobj_regional, 'delp_inc', tmp)
increment_data%delp_inc=tmp(is:ie,js:je,:)
if ( .not. Atm%flagstruct%hydrostatic ) then
call read_data(fileobj_regional, 'delz_inc', tmp)
increment_data%delz_inc=tmp(is:ie,js:je,:)
end if

! Read tracer increments
do itracer = 1,ntracers
call get_tracer_names(MODEL_ATMOS, itracer, tracer_name)
if ( variable_exists(fileobj_regional, trim(tracer_name)//'_inc') ) then
call read_data(fileobj_regional, trim(tracer_name)//'_inc', tmp)
increment_data%tracer_inc(:,:,:,itracer)=tmp(is:ie,js:je,:)
end if
end do
call close_file(fileobj_regional)
end if
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this block is needed. The original code should be able to handle reading in the (is:ie,js:je,:) section of each rank.

What error/behavior were you getting without these changes? Were all ranks reading in the same data?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @uramirez8707
When using the original type(FmsNetcdfDomainFile_t) :: fileobj together with

if (open_file(fileobj, trim(fname), 'read', Atm%domain)) then 
  call read_data(fileobj, 'u_inc', increment_data%ua_inc) 

the code consistently failed at the open_file stage when reading the regional increment file. Unfortunately, no informative diagnostic message was produced to indicate the exact cause of the failure.
As a comparison test, I switched to using type(FmsNetcdfFile_t) :: fileobj_regional to open the same increment file, and in that case the file opened and the data were read successfully without issue.

My current guess is that FmsNetcdfDomainFile_t may be coupled to a specific grid or tiling metadata expected by the domain object—likely assuming a global or multi-tile configuration. In our case, the regional 3DIAU increment file corresponds only to a single moving nest tile 8 and does not carry the same grid/tiling definition as a full FV3 domain file. This mismatch may cause the domain-aware file interface to reject the file at open time.

The added block is therefore a workaround to allow successful reading of the regional increment data using a grid-agnostic NetCDF interface. I understand it is not ideal, but since our nest domain is very small (660 x 660 x 81), the computational cost seems to be acceptable. If there is a recommended way to make FmsNetcdfDomainFile_t work with single-tile, nest regional increment files, I would be very interested in adopting that approach instead.

Copy link
Copy Markdown
Contributor

@gaokun227 gaokun227 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out of area of expertise but I don't see any immediate issues.

Comment thread tools/cubed_sphere_inc_mod.F90 Outdated
Comment thread tools/fv_iau_mod.F90 Outdated
Comment thread tools/fv_iau_mod.F90 Outdated
@gspetro-NOAA
Copy link
Copy Markdown

gspetro-NOAA commented Jan 22, 2026

@vithikashah001 Could we get your review/approval on this PR so that we can schedule WM parent PR 3014 for the commit queue?

@laurenchilutti
Copy link
Copy Markdown
Member

I will review on Vithika's behalf.

@laurenchilutti laurenchilutti requested review from laurenchilutti and removed request for vithikashah001 January 22, 2026 18:35
@gspetro-NOAA
Copy link
Copy Markdown

Testing completed successfully on WM parent PR 3014. This PR can be merged.

@gspetro-NOAA
Copy link
Copy Markdown

@laurenchilutti @bensonr @vithikashah001 Could one of you please merge this PR?

@vithikashah001 vithikashah001 merged commit 3e5db37 into NOAA-GFDL:dev/emc Feb 12, 2026
@BinLiu-NOAA BinLiu-NOAA deleted the feature/hafsv2_sync branch February 14, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.