Skip to content

Commit

Permalink
cherry-pick from dev/ufs-weather-model: 4ffc47e
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen authored and MatthewMasarik-NOAA committed Feb 7, 2024
1 parent fd6d559 commit 7441c25
Show file tree
Hide file tree
Showing 4 changed files with 1,830 additions and 5 deletions.
18 changes: 16 additions & 2 deletions model/src/cmake/src_list.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ set(ftn_src
wmupdtmd.F90
wmwavemd.F90
w3tidemd.F90
wav_grdout.F90
w3iogoncdmd.F90
wav_shr_flags.F90
)

set(nuopc_mesh_cap_src
wav_kind_mod.F90
wav_shr_mod.F90
wav_shel_inp.F90
wav_comp_nuopc.F90
wav_import_export.F90
wav_wrapper_mod.F90
)

set(esmf_multi_cap_src
wmesmfmd.F90
)

# Built when PDLIB is enabled
Expand Down Expand Up @@ -92,5 +108,3 @@ set(scripnc_src
${CMAKE_CURRENT_SOURCE_DIR}/SCRIP/scrip_remap_write.f
${CMAKE_CURRENT_SOURCE_DIR}/SCRIP/scrip_remap_read.f
)


18 changes: 15 additions & 3 deletions model/src/w3fld1md.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
DO K=KA1, KA2-1
AVG=SUM(INSPC(K,:))/MAX(REAL(NTH),1.)
DO T=1,NTH
INSPC(K,T)=BT(K)*INSPC(K,T)/TPI/(WN2(K)**3.0)/AVG
if (avg /= 0.0) then
INSPC(K,T)=BT(K)*INSPC(K,T)/TPI/(WN2(K)**3.0)/AVG
else
inspc(k,t) = 0.0
end if
ENDDO
ENDDO
!-----------------------------------------------------------
Expand All @@ -1138,7 +1142,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
ENDDO
AVG=SUM(NORMSPC)/MAX(REAL(NTH),1.)
DO T=1, NTH
INSPC(K,T) = SAT * NORMSPC(T)/TPI/(WN2(K)**3.0)/AVG
if (avg /= 0.0) then
INSPC(K,T) = SAT * NORMSPC(T)/TPI/(WN2(K)**3.0)/AVG
else
inspc(k,t) = 0.0
end if
ENDDO
ENDDO
DO T=1, NTH
Expand All @@ -1152,7 +1160,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
AVG=SUM(NORMSPC)/MAX(REAL(NTH),1.)!1./4.
DO K=KA3+1, NKT
DO T=1, NTH
INSPC(K,T)=NORMSPC(T)*(SAT)/TPI/(WN2(K)**3.0)/AVG
if (avg /= 0.0) then
INSPC(K,T)=NORMSPC(T)*(SAT)/TPI/(WN2(K)**3.0)/AVG
else
inspc(k,t) = 0.0
end if
ENDDO
ENDDO
DEALLOCATE(ANGLE1)
Expand Down
Loading

0 comments on commit 7441c25

Please sign in to comment.