Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c5ddec2
Performance optimization of moving nest.
wramstrom Apr 15, 2022
2b413b5
Moving nest performance optimization stage 2.
wramstrom May 2, 2022
9d663a1
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA May 16, 2022
1fbffd9
Merge remote-tracking branch 'RB/emc_io_fixes' into feature/hafsv0.3_…
BinLiu-NOAA May 20, 2022
0cd5847
Update atmos_model_nml in driver/fvGFS/atmosphere.F90 so that it is c…
BinLiu-NOAA May 21, 2022
205d775
Removed reference to unused variable parent_x.
wramstrom Jul 29, 2022
54785db
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Oct 9, 2022
af29d30
Adding upoff as a namelist parameter
BijuThomas-NOAA Oct 12, 2022
9e6cff1
Merge remote-tracking branch 'upstream/dev/emc' into feature/hafs_syn…
BinLiu-NOAA Oct 22, 2022
9b56598
Update to output timestr in yyyymmdd.hhmmss for the internal tracker
BinLiu-NOAA Oct 28, 2022
3b07777
Merge remote-tracking branch 'remotes/origin/dev/emc' into support/HAFS
BinLiu-NOAA Dec 20, 2022
59a74c9
Remove "-nowarn" build option in cmake/compiler_flags_Intel_Fortran.c…
BinLiu-NOAA Feb 23, 2023
cc64826
Use 32bit value for 'missing_value' and '_FillValue' attributes (#236)
DusanJovic-NOAA Jan 25, 2023
39f75ef
Merge remote-tracking branch 'remotes/hcomm/production/hafs.v1' into …
BinLiu-NOAA May 1, 2023
94bf82f
give istatus a value on exit from hailcast_init
bensonr Feb 27, 2024
f7ff2af
fix issues with declared out variables in test_cases.F90
bensonr Feb 27, 2024
978f1de
fix out of range default integers, eol spaces, and remove delz argume…
bensonr Feb 28, 2024
2cc9f5d
removed -nowarn from Intel compiler flags
bensonr Feb 28, 2024
4bfb82d
typo qb->qp
bensonr Feb 28, 2024
6bcd3bb
added suggested ifdef to remove goto warning as per operations
bensonr Mar 29, 2024
0d9d297
Merge branch 'dev/emc' into comp_warn
bensonr Apr 4, 2024
6fcbe13
Remove the nowarn flag from the build
BijuThomas-NOAA Apr 5, 2024
5a863fd
Merge remote-tracking branch 'remotes/bensonr/comp_warn' into product…
BinLiu-NOAA Apr 8, 2024
4162fad
Correct the jc index when print out the nest grid corner locations in
BinLiu-NOAA Apr 8, 2024
df5a9e4
Merge remote-tracking branch 'remotes/origin/production/hafs.v2' into…
BinLiu-NOAA May 20, 2024
e255823
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Jul 3, 2024
3bdb6a1
Add IAU related functions for regional HAFS DA.
XuLu-NOAA Jul 12, 2024
cf15442
Fix do loop bounds in a2b_ord2 routine in to avoid reading from unini…
DusanJovic-NOAA Jul 12, 2024
1a8f38b
Add '-init=snan,arrays' compiler flag to Intel debug Fortran flags (C…
DusanJovic-NOAA Jul 12, 2024
a416726
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA May 1, 2025
7bdc2c6
3D-TKE EMDF GFS PBL scheme related changes from FIU (Ping Zhu, Ping.Z…
BinLiu-NOAA May 9, 2025
c50e339
Update submodules fv3/atmos_cubed_sphere for 3dtke data structure
May 23, 2025
bd0e414
Update based on stylistic comments and mpi use in dyn_core
Jun 3, 2025
18629c7
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Jun 13, 2025
219f701
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Jun 13, 2025
ec21a2a
Change dku3d_h to be an optional input variable for d_sw subroutine. …
BinLiu-NOAA Jun 27, 2025
9307933
Merge remote-tracking branch 'remotes/origin/feature/3dtke_gfspbl' in…
BinLiu-NOAA Jun 28, 2025
9ee6243
Merge remote-tracking branch 'origin/feature/3dtke_update' into featu…
BinLiu-NOAA Jul 11, 2025
5971069
Merge remote-tracking branch 'remotes/origin/feature/3dtke_update' in…
BinLiu-NOAA Jul 19, 2025
9a32e89
Merge branch 'feature/3dtke_update' into feature/hafs.v2.1.1
BinLiu-NOAA Jul 28, 2025
d7b9939
From @JongilHan66: For the 3DTKE option, update damp2 (in sw_core.F90)
BinLiu-NOAA Aug 7, 2025
7a9f210
Merge remote-tracking branch 'remotes/origin/feature/3dtke_update' in…
BinLiu-NOAA Aug 25, 2025
2dfba59
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Nov 19, 2025
3fd53f6
Merge remote-tracking branch 'remotes/origin/dev/emc' into feature/ha…
BinLiu-NOAA Dec 7, 2025
9660070
Using the FV3 read_cubed_sphere_inc function to read in the regional …
XuLu-NOAA Dec 10, 2025
147de57
Change Regional 3DIAU from even weighting to linear decaying weighting
XuLu-NOAA Dec 10, 2025
9fc595b
Revert the linear decaying weighting function in 3DIAU. Switch to the…
XuLu-NOAA Dec 12, 2025
3be2421
Merge remote-tracking branch 'remotes/hcomm/feature/hafsv2p2_phase2' …
BinLiu-NOAA Dec 12, 2025
b40d4cd
Adjust the regional 3DIAU interface with the global FMS approach with…
XuLu-NOAA Dec 29, 2025
1f6c9ec
Merge remote-tracking branch 'remotes/upstream/dev/emc' into feature/…
BinLiu-NOAA Dec 30, 2025
3f74254
Changing is_master to mpp_error for warning messages
XuLu-NOAA Jan 12, 2026
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
31 changes: 23 additions & 8 deletions tools/cubed_sphere_inc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ module cubed_sphere_inc_mod
use field_manager_mod, only: MODEL_ATMOS
use fv_arrays_mod, only: fv_atmos_type
use fms2_io_mod, only: open_file, close_file, read_data, variable_exists, &
FmsNetcdfDomainFile_t, register_axis

FmsNetcdfDomainFile_t, register_axis, FmsNetcdfFile_t
use mpp_mod, only: mpp_error, NOTE

implicit none
type increment_data_type
real, allocatable :: ua_inc(:,:,:)
Expand All @@ -22,24 +23,37 @@ module cubed_sphere_inc_mod

!----------------------------------------------------------------------------------------

subroutine read_cubed_sphere_inc(fname, increment_data, Atm)
subroutine read_cubed_sphere_inc(fname, increment_data, Atm, IAU_regional)
character(*), intent(in) :: fname
type(increment_data_type), intent(inout) :: increment_data
type(fv_atmos_type), intent(in) :: Atm
logical, intent(in) :: IAU_regional

type(FmsNetcdfDomainFile_t) :: fileobj
type(FmsNetcdfFile_t) :: fileobj_regional
integer :: itracer, ntracers
character(len=64) :: tracer_name

character(len=:), allocatable :: fname_base
integer :: ipos
! Get various dimensions
call get_number_tracers(MODEL_ATMOS, num_tracers=ntracers)

! Open file
if ( open_file(fileobj, trim(fname), 'read', Atm%domain) ) then
if (IAU_regional) then
ipos = index(fname, '.')
if (ipos > 0) then
fname_base = fname(1:ipos-1)
else
fname_base = trim(fname)
endif
fname_base=trim(fname_base)//'.nc'
else
fname_base=trim(fname)
end if
if ( open_file(fileobj, trim(fname_base), 'read', Atm%domain) ) then
! Register axes
call register_axis(fileobj, 'xaxis_1', 'x')
call register_axis(fileobj, 'yaxis_1', 'y')

! Read increments
call read_data(fileobj, 'u_inc', increment_data%ua_inc)
call read_data(fileobj, 'v_inc', increment_data%va_inc)
Expand All @@ -54,12 +68,13 @@ subroutine read_cubed_sphere_inc(fname, increment_data, Atm)
call get_tracer_names(MODEL_ATMOS, itracer, tracer_name)
if ( variable_exists(fileobj, trim(tracer_name)//'_inc') ) then
call read_data(fileobj, trim(tracer_name)//'_inc', increment_data%tracer_inc(:,:,:,itracer))
else
call mpp_error(NOTE, 'No Increment for '//trim(tracer_name)//' found, assuming zero')
increment_data%tracer_inc(:,:,:,itracer) = 0.0
end if
end do

call close_file(fileobj)
end if

end subroutine read_cubed_sphere_inc

!----------------------------------------------------------------------------------------
Expand Down
65 changes: 41 additions & 24 deletions tools/fv_iau_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,15 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)

if( file_exists(fname) ) then
call open_ncfile( fname, ncid ) ! open the file
call get_ncdim1( ncid, 'lon', im)
call get_ncdim1( ncid, 'lat', jm)
call get_ncdim1( ncid, 'lev', km)
if (IPD_Control%iau_regional) then
call get_ncdim1( ncid, 'xaxis_1', im)
call get_ncdim1( ncid, 'yaxis_1', jm)
call get_ncdim1( ncid, 'zaxis_1', km)
else
call get_ncdim1( ncid, 'lon', im)
call get_ncdim1( ncid, 'lat', jm)
call get_ncdim1( ncid, 'lev', km)
end if

if (km.ne.npz) then
if (is_master()) print *, 'km = ', km
Expand All @@ -194,20 +200,22 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)

if(is_master()) write(*,*) fname, ' DA increment dimensions:', im,jm,km

allocate ( lon(im) )
allocate ( lat(jm) )
if (.not.IPD_Control%iau_regional) then
allocate ( lon(im) )
allocate ( lat(jm) )

call _GET_VAR1 (ncid, 'lon', im, lon )
call _GET_VAR1 (ncid, 'lat', jm, lat )
call close_ncfile(ncid)
call _GET_VAR1 (ncid, 'lon', im, lon )
call _GET_VAR1 (ncid, 'lat', jm, lat )
call close_ncfile(ncid)

! Convert to radians
do i=1,im
lon(i) = lon(i) * deg2rad
enddo
do j=1,jm
lat(j) = lat(j) * deg2rad
enddo
! Convert to radians
do i=1,im
lon(i) = lon(i) * deg2rad
enddo
do j=1,jm
lat(j) = lat(j) * deg2rad
enddo
end if

else
call mpp_error(FATAL,'==> Error in IAU_initialize: Expected file '&
Expand All @@ -226,10 +234,12 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)
agrid(is-1+i,js-1+j,2)=Init_parm%xlat(i,j)
enddo
enddo
call remap_coef( is, ie, js, je, is, ie, js, je, &
if (.not.IPD_Control%iau_regional) then
call remap_coef( is, ie, js, je, is, ie, js, je, &
im, jm, lon, lat, id1, id2, jdc, s2c, &
agrid)
deallocate ( lon, lat,agrid )
deallocate ( lon, lat,agrid )
end if


allocate(IAU_Data%ua_inc(is:ie, js:je, km))
Expand All @@ -247,11 +257,12 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)
allocate (iau_state%inc1%tracer_inc(is:ie, js:je, km,ntracers))
iau_state%hr1=IPD_Control%iaufhrs(1)
iau_state%wt = 1.0 ! IAU increment filter weights (default 1.0)
iau_state%wt=iau_state%wt*IPD_Control%iau_inc_scale !Increase the weight
iau_state%wt_normfact = 1.0
if (IPD_Control%iau_filter_increments) then
! compute increment filter weights, sum to obtain normalization factor
dtp=IPD_control%dtp
nstep = 0.5*IPD_Control%iau_delthrs*3600/dtp
nstep = nint(0.5*IPD_Control%iau_delthrs*3600/dtp)
! compute normalization factor for filter weights
normfact = 0.
do k=1,2*nstep+1
Expand All @@ -268,8 +279,9 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)
enddo
iau_state%wt_normfact = (2*nstep+1)/normfact
endif
if (IPD_Control%iau_regional) iau_state%wt_normfact=iau_state%wt_normfact*IPD_Control%iau_inc_scale
if ( Atm%flagstruct%increment_file_on_native_grid ) then
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(1)), iau_state%inc1, Atm)
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(1)), iau_state%inc1, Atm, IPD_Control%iau_regional)
else
call read_iau_forcing(IPD_Control,iau_state%inc1,'INPUT/'//trim(IPD_Control%iau_inc_files(1)))
endif
Expand All @@ -285,7 +297,7 @@ subroutine IAU_initialize (IPD_Control, IAU_Data, Init_parm, Atm)
allocate (iau_state%inc2%tracer_inc(is:ie, js:je, km,ntracers))
iau_state%hr2=IPD_Control%iaufhrs(2)
if ( Atm%flagstruct%increment_file_on_native_grid ) then
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(2)), iau_state%inc2, Atm)
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(2)), iau_state%inc2, Atm, IPD_Control%iau_regional)
else
call read_iau_forcing(IPD_Control,iau_state%inc2,'INPUT/'//trim(IPD_Control%iau_inc_files(2)))
endif
Expand Down Expand Up @@ -323,9 +335,9 @@ subroutine getiauforcing(IPD_Control,IAU_Data,Atm)
! in window kstep=-nstep,nstep (2*nstep+1 total)
! time step IPD_control%dtp
dtp=IPD_control%dtp
nstep = 0.5*IPD_Control%iau_delthrs*3600/dtp
nstep = nint(0.5*IPD_Control%iau_delthrs*3600/dtp)
! compute normalized filter weight
kstep = ((IPD_Control%fhour-t1) - 0.5*IPD_Control%iau_delthrs)*3600./dtp
kstep = nint(((IPD_Control%fhour-t1) - 0.5*IPD_Control%iau_delthrs)*3600./dtp)
if (IPD_Control%fhour >= t1 .and. IPD_Control%fhour < t2) then
sx = acos(-1.)*kstep/nstep
wx = acos(-1.)*kstep/(nstep+1)
Expand Down Expand Up @@ -375,7 +387,7 @@ subroutine getiauforcing(IPD_Control,IAU_Data,Atm)
iau_state%inc1=iau_state%inc2
if (is_master()) print *,'reading next increment file',trim(IPD_Control%iau_inc_files(itnext))
if ( Atm%flagstruct%increment_file_on_native_grid ) then
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(itnext)), iau_state%inc2, Atm)
call read_cubed_sphere_inc('INPUT/'//trim(IPD_Control%iau_inc_files(itnext)), iau_state%inc2, Atm, IPD_Control%iau_regional)
else
call read_iau_forcing(IPD_Control,iau_state%inc2,'INPUT/'//trim(IPD_Control%iau_inc_files(itnext)))
endif
Expand Down Expand Up @@ -481,7 +493,12 @@ subroutine read_iau_forcing(IPD_Control,increments,fname)
enddo
enddo

allocate ( wk3(1:im,jbeg:jend, 1:km) )
if (IPD_Control%iau_regional) then
allocate ( wk3(1:im,js:je, 1:km) )
else
allocate ( wk3(1:im,jbeg:jend, 1:km) )
endif

! read in 1 time level
call interp_inc('T_inc',increments%temp_inc(:,:,:),jbeg,jend)
call interp_inc('delp_inc',increments%delp_inc(:,:,:),jbeg,jend)
Expand Down
2 changes: 1 addition & 1 deletion tools/fv_treat_da_inc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ subroutine read_da_inc_cubed_sphere(Atm, fv_domain, bd, npz_in, nq, &

! Read increments
fname = trim(fname_prefix) // '.nc'
call read_cubed_sphere_inc(fname, increment_data, Atm)
call read_cubed_sphere_inc(fname, increment_data, Atm, .False.)

! Wind increments
! ---------------
Expand Down