Skip to content
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

remove unneeded fields for dev/ufs-weather-model #1317

Draft
wants to merge 53 commits into
base: dev/ufs-weather-model
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
31d7f36
clean branch for pio work
DeniseWorthen Aug 28, 2024
0fe584a
add new files
DeniseWorthen Aug 28, 2024
099645b
rename w3iogoncmd as wav_history_mod
DeniseWorthen Aug 28, 2024
c7a9ee3
rework order to enable PIO initialization
DeniseWorthen Aug 28, 2024
0ece778
clean up w3iors, ascii and config variables
DeniseWorthen Aug 28, 2024
efd5774
prevent mpi_startalls if restartnc is active
DeniseWorthen Aug 28, 2024
3b038ff
move setting of flpart flag
DeniseWorthen Aug 29, 2024
6e32b5f
remove unneeded CESMCOUPLED from w3iorsmd
DeniseWorthen Aug 30, 2024
9976c4d
update nc block location, add log messages
DeniseWorthen Aug 31, 2024
32c5f25
use pio_ioformat for create mode
DeniseWorthen Sep 1, 2024
4edfbc6
make iosys a pointer, add debug level config
DeniseWorthen Sep 1, 2024
fbeb83e
fix ww3 thrd cases
DeniseWorthen Sep 2, 2024
5aedf8c
remove stray bin2nc ifdef
DeniseWorthen Sep 3, 2024
4f62341
fixes for logs and wav_history
DeniseWorthen Sep 6, 2024
553f1b1
resolve issue for binary history files
DeniseWorthen Sep 9, 2024
8d0f170
fix multiple writes when waves are in slow loop
DeniseWorthen Sep 10, 2024
9cb49d1
rename oldst2 variable in wav_restart
DeniseWorthen Sep 11, 2024
4674dae
add verbose log option
DeniseWorthen Sep 16, 2024
7c43376
add optional restart files via nml
DeniseWorthen Sep 20, 2024
f9531d0
resolve issue w/ nml for extra fields
DeniseWorthen Sep 21, 2024
ad51cd6
add generic read/write for added restart fields
DeniseWorthen Sep 22, 2024
d92e9ff
fix generic read/write in wav_restart
DeniseWorthen Sep 23, 2024
e0134de
initialize variables
DeniseWorthen Sep 26, 2024
6465186
replace statically allocated arrays to reduce memory
DeniseWorthen Oct 1, 2024
e556ea8
Merge remote-tracking branch 'origin/feature/reducememuse_triamd' int…
DeniseWorthen Oct 2, 2024
008272c
in wav_restart, make arrays allocatable
DeniseWorthen Oct 2, 2024
9b0f44c
write va in nspec loop
DeniseWorthen Oct 7, 2024
e690219
fix compile error
DeniseWorthen Oct 7, 2024
91f1111
Merge branch 'dev/ufs-weather-model' into feature/pio4ww3
DeniseWorthen Oct 8, 2024
c25510f
Merge branch 'dev/ufs-weather-model' into feature/debugsubset
DeniseWorthen Oct 8, 2024
cc7e41c
make dofs i*8 arrays
DeniseWorthen Oct 8, 2024
39b3d90
whitespace cleanup
DeniseWorthen Oct 8, 2024
6dfa4a8
write/read each nspec separately
DeniseWorthen Oct 8, 2024
28b148d
fix dimension error
DeniseWorthen Oct 8, 2024
bd26c2a
fix calculation of dof3d for large meshes
DeniseWorthen Oct 10, 2024
4819e55
Merge branch 'feature/debugsubset_multifld' into feature/pio4ww3
DeniseWorthen Oct 15, 2024
6f28c27
add error checks for dimensions in restart file
DeniseWorthen Oct 15, 2024
06c2099
fix deallocation issue when dbug_flag>5
DeniseWorthen Oct 22, 2024
908c105
minimize allocated forcing fields when using cmeps
DeniseWorthen Nov 6, 2024
4cd19a2
Merge branch 'dev/ufs-weather-model' into HEAD
DeniseWorthen Nov 14, 2024
a6fd6fa
Merge branch 'dev/ufs-weather-model' into feature/nodupfields
DeniseWorthen Dec 13, 2024
48abe2a
Merge branch 'dev/ufs-weather-model' into feature/nodupfields
DeniseWorthen Jan 22, 2025
cc8789c
revert
DeniseWorthen Jan 22, 2025
64b8442
Merge branch 'NOAA-EMC:dev/ufs-weather-model' into dev/ufs-weather-model
DeniseWorthen Jan 22, 2025
49656a1
Merge branch 'dev/ufs-weather-model' into feature/nodupfields
DeniseWorthen Jan 22, 2025
2d00cc9
recreate feature branch
DeniseWorthen Jan 22, 2025
7244b76
trigp test branch
DeniseWorthen Jan 22, 2025
93cc635
Revert "trigp test branch"
DeniseWorthen Jan 22, 2025
51c2d29
Merge branch 'NOAA-EMC:dev/ufs-weather-model' into dev/ufs-weather-model
DeniseWorthen Feb 7, 2025
d31915b
Merge branch 'dev/ufs-weather-model' into feature/nodupfields
DeniseWorthen Feb 7, 2025
60a7b1b
Merge branch 'NOAA-EMC:dev/ufs-weather-model' into dev/ufs-weather-model
DeniseWorthen Feb 21, 2025
09c1f2f
Merge branch 'dev/ufs-weather-model' into feature/nodupfields
DeniseWorthen Feb 21, 2025
b780d99
remove extra blank line
DeniseWorthen Feb 26, 2025
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
Prev Previous commit
Next Next commit
trigp test branch
DeniseWorthen committed Jan 22, 2025
commit 7244b76a5e475bce5226d2c17fbd1c75e0d7f1b4
2 changes: 1 addition & 1 deletion model/src/wav_comp_nuopc.F90
Original file line number Diff line number Diff line change
@@ -945,7 +945,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
end if

if (dbug_flag > 5) then
call write_meshdecomp(Emesh, 'emesh', rc=rc)
call write_meshdecomp(Emesh, 'emesh', nseal_cpl, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if

18 changes: 15 additions & 3 deletions model/src/wav_history_mod.F90
Original file line number Diff line number Diff line change
@@ -114,6 +114,7 @@ subroutine write_history ( timen )
logical :: s_axis = .false., m_axis = .false., p_axis = .false., k_axis = .false.

integer :: lmap(nseal_cpl)
integer :: ltrigp(3,nseal_cpl)

! -------------------------------------------------------------
! create the netcdf file
@@ -256,14 +257,25 @@ subroutine write_history ( timen )
call handle_err(ierr, 'put time')

if (gtype .eq. ungtype) then
! trigp is global
ltrigp(:,:) = 0
!call init_get_isea(isea, jsea)
!if (lglobal) then
! varloc = var(isea)
!else
!varout(jsea) = varloc*dir(isea)
do jsea = 1,nseal_cpl
call init_get_isea(isea, jsea)
ltrigp(:,jsea) = trigp(:,isea)
print *,'YYY ',jsea,isea,trigp(:,isea)
end do
print *,'XXX ',iaproc,size(trigp,1),size(trigp,2)
ierr = pio_inq_varid(pioid, 'nconn', varid)
call handle_err(ierr, 'inquire variable nconn ')
ierr = pio_put_var(pioid, varid, trigp)
ierr = pio_put_var(pioid, varid, ltrigp)
call handle_err(ierr, 'put trigp')
end if

! TODO: tried init decomp w/ use_int=.true. but getting garbage
! land values....sea values OK
! mapsta is global
lmap(:) = 0
do jsea = 1,nseal_cpl
23 changes: 21 additions & 2 deletions model/src/wav_shr_mod.F90
Original file line number Diff line number Diff line change
@@ -229,30 +229,35 @@ end subroutine diagnose_mesh
!!
!> @author [email protected], [email protected]
!> @date 09-12-2022
subroutine write_meshdecomp(EMeshIn, mesh_name, rc)
subroutine write_meshdecomp(EMeshIn, mesh_name, nseal_cpl, rc)

use ESMF , only : ESMF_Mesh, ESMF_DistGrid, ESMF_Field, ESMF_FieldBundle, ESMF_FieldBundleAdd
use ESMF , only : ESMF_DistGridGet, ESMF_FieldBundleCreate, ESMF_FieldCreate, ESMF_FieldBundleGet
use ESMF , only : ESMF_MESHLOC_ELEMENT, ESMF_TYPEKIND_R8, ESMF_TYPEKIND_I4, ESMF_LOGMSG_Info
use ESMF , only : ESMF_FieldBundleWrite, ESMF_FieldBundleDestroy

use w3odatmd , only : iaproc
use w3gdatmd , only : ntri, trigp
use w3parall , only : init_get_isea

! input/output variables
type(ESMF_Mesh) , intent(in) :: EMeshIn
character(len=*), intent(in) :: mesh_name
integer , intent(in) :: nseal_cpl
integer , intent(out) :: rc

! local variables
type(ESMF_FieldBundle) :: FBTemp
type(ESMF_Field) :: lfield
type(ESMF_DistGrid) :: distgrid
type(ESMF_Field) :: doffield
type(ESMF_Field) :: doffield, trifield
character(len=6), dimension(4) :: lfieldlist
integer :: i,ndims,nelements
integer :: isea,jsea
real(r8), pointer :: fldptr1d(:)
integer(i4), allocatable :: dof(:)
integer(i4), pointer :: dofptr(:)
integer(i4), pointer :: itri(:,:)
real(r8), pointer :: ownedElemCoords(:), ownedElemCoords_x(:), ownedElemCoords_y(:)
character(len=*),parameter :: subname = '(wav_shr_mod:write_meshdecomp) '
!-------------------------------------------------------
@@ -266,6 +271,20 @@ subroutine write_meshdecomp(EMeshIn, mesh_name, rc)

call ESMF_MeshGet(EMeshIn, spatialDim=ndims, numOwnedElements=nelements, elementDistgrid=distgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (unstr_mesh) then
trifield = ESMF_FieldCreate(EMeshIn, ESMF_TYPEKIND_I4, name='nconn', meshloc=ESMF_MESHLOC_ELEMENT, &
ungriddedLBound=(/1/), ungriddedUBound=(/size(trigp,1)/), gridToFieldMap=(/2/), rc=rc)
call ESMF_FieldGet(trifield, farrayPtr=itri, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
! retrieve DE local trigp array
itri = 0
do jsea = 1,nseal_cpl
call init_get_isea(isea, jsea)
itri(:,jsea) = trigp(:,isea)
end do
call ESMF_FieldBundleAdd(FBTemp, (/trifield/), rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if

lfieldlist = (/'dof ', 'coordx', 'coordy', 'decomp'/)
! index array