From bb133704a0b8d449dbd078775617f2a72c9108eb Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Thu, 16 Jan 2025 15:16:59 +0000 Subject: [PATCH 1/7] Add a fill value in wav_import_export.F90. --- model/src/wav_import_export.F90 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 9d859989d..3899f35df 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -293,6 +293,8 @@ subroutine import_fields( gcomp, time0, timen, rc ) character(len=10) :: vwnd integer :: imod, j, jmod integer :: mpi_comm_null = -1 + integer :: isea + real(r4), parameter :: fillv = 9.99e20 real(r4), allocatable :: wxdata(:) ! only needed if merge_import real(r4), allocatable :: wydata(:) ! only needed if merge_import character(len=CL) :: msgString @@ -357,6 +359,10 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (state_fldchk(importState, 'So_u')) then call SetGlobalInput(importState, 'So_u', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + do isea = 1,nsea + if(abs(global_data(isea)-fillv).lt.0.01) then + global_data(isea)=0.0 + enddo call FillGlobalInput(global_data, CX0) call FillGlobalInput(global_data, CXN) end if @@ -366,6 +372,10 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (state_fldchk(importState, 'So_v')) then call SetGlobalInput(importState, 'So_v', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + do isea = 1,nsea + if(abs(global_data(isea)-fillv).lt.0.01) then + global_data(isea)=0.0 + enddo call FillGlobalInput(global_data, CY0) call FillGlobalInput(global_data, CYN) end if From 63480fb7a518ca7770b94be65ab3318315c1e367 Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Sun, 19 Jan 2025 09:50:14 +0000 Subject: [PATCH 2/7] Update wav_import_export.F90. --- model/src/wav_import_export.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 3899f35df..c14b06c0a 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -362,7 +362,8 @@ subroutine import_fields( gcomp, time0, timen, rc ) do isea = 1,nsea if(abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0 - enddo + end if + end do call FillGlobalInput(global_data, CX0) call FillGlobalInput(global_data, CXN) end if @@ -375,7 +376,8 @@ subroutine import_fields( gcomp, time0, timen, rc ) do isea = 1,nsea if(abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0 - enddo + end if + end do call FillGlobalInput(global_data, CY0) call FillGlobalInput(global_data, CYN) end if From 08027973064270b01e6c8812def9fe8ed1d4428d Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Mon, 27 Jan 2025 19:13:59 +0000 Subject: [PATCH 3/7] Convert a missing value to zero for the imported ocean-current fields only when the case_name is ufs.hafs. --- model/src/wav_import_export.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index c14b06c0a..466658dd0 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -272,6 +272,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) use wmupdtmd , only: wmupd2 use wmmdatmd , only: wmsetm use wmmdatmd , only: mdse, mdst, nrgrd, inpmap + use wav_shr_mod , only : casename #ifdef W3_MPI use wmmdatmd , only: mpi_comm_grd #endif @@ -360,7 +361,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) call SetGlobalInput(importState, 'So_u', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return do isea = 1,nsea - if(abs(global_data(isea)-fillv).lt.0.01) then + if(casename == "ufs.hafs" .and. abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0 end if end do @@ -374,7 +375,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) call SetGlobalInput(importState, 'So_v', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return do isea = 1,nsea - if(abs(global_data(isea)-fillv).lt.0.01) then + if(casename == "ufs.hafs" .and. abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0 end if end do From ecff3ea1f1e750cac5b34ead21e1d1251dbe1c11 Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Wed, 29 Jan 2025 18:59:22 +0000 Subject: [PATCH 4/7] Update wav_import_export.F90. --- model/src/wav_import_export.F90 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 466658dd0..e28eff8d1 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -360,11 +360,14 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (state_fldchk(importState, 'So_u')) then call SetGlobalInput(importState, 'So_u', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - do isea = 1,nsea - if(casename == "ufs.hafs" .and. abs(global_data(isea)-fillv).lt.0.01) then - global_data(isea)=0.0 + + if(casename == "ufs.hafs") then + do isea = 1,nsea + if(abs(global_data(isea)-fillv).lt.0.01) then + global_data(isea)=0.0 + end if + end do end if - end do call FillGlobalInput(global_data, CX0) call FillGlobalInput(global_data, CXN) end if @@ -374,15 +377,16 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (state_fldchk(importState, 'So_v')) then call SetGlobalInput(importState, 'So_v', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - do isea = 1,nsea - if(casename == "ufs.hafs" .and. abs(global_data(isea)-fillv).lt.0.01) then - global_data(isea)=0.0 + if(casename == "ufs.hafs") then + do isea = 1,nsea + if(abs(global_data(isea)-fillv).lt.0.01) then + global_data(isea)=0.0 + end if + end do end if - end do call FillGlobalInput(global_data, CY0) call FillGlobalInput(global_data, CYN) end if - end if ! --------------- ! INFLAGS1(3) - atm wind/temp fields From 1317bab35dbc9752d9486ed006d06d915da76522 Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Thu, 30 Jan 2025 12:17:46 +0000 Subject: [PATCH 5/7] Update wav_import_export.F90. --- model/src/wav_import_export.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index 7b6192bfa..b9400e890 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -401,6 +401,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) call FillGlobalInput(global_data, CY0) call FillGlobalInput(global_data, CYN) end if + end if ! --------------- ! INFLAGS1(3) - atm wind/temp fields From ed3625a7ca836b7a7d20fbb54c38344ad91604b6 Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Thu, 6 Feb 2025 14:53:42 +0000 Subject: [PATCH 6/7] Update wav_import_export.F90. --- model/src/wav_import_export.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index b9400e890..da7bc2c0e 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -375,7 +375,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) call SetGlobalInput(importState, 'So_u', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - if(casename == "ufs.hafs") then + if(trim(casename) == 'ufs.hafs') then do isea = 1,nsea if(abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0 From 092ca86b5daced4bbde37d3cd4e8659e5b393640 Mon Sep 17 00:00:00 2001 From: "Bin.Li" Date: Thu, 6 Feb 2025 15:05:00 +0000 Subject: [PATCH 7/7] Updated wav_import_export.F90. --- model/src/wav_import_export.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90 index da7bc2c0e..d8ebe7c2b 100644 --- a/model/src/wav_import_export.F90 +++ b/model/src/wav_import_export.F90 @@ -391,7 +391,7 @@ subroutine import_fields( gcomp, time0, timen, rc ) if (state_fldchk(importState, 'So_v')) then call SetGlobalInput(importState, 'So_v', vm, global_data, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - if(casename == "ufs.hafs") then + if(trim(casename) == 'ufs.hafs') then do isea = 1,nsea if(abs(global_data(isea)-fillv).lt.0.01) then global_data(isea)=0.0