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

R21B in IC4 #1176

Merged
merged 6 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
This is for the issue "R21B to IC4 subroutine"
I have ported my changes from COAMPS/WW3 (which is v6.07) to my fork, branch "1167-R21B-in-IC4" (which is version 7.14+).
Changes are made to 4 of the WW3 fortran files.'
I needed to do the merge manually, since there are a lot of formatting changes (etc.) going from 6.07 to 7.14.
  • Loading branch information
ErickRogers committed Jan 12, 2024
commit 864657489c3983953916ca25081a0ebb597293bb
21 changes: 17 additions & 4 deletions model/src/w3gdatmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,14 @@ MODULE W3GDATMD
! Default is 1.0, meaning that 100% ice
! concentration result in zero source term
! If set to 0.0, then ice has no direct impact on Sln / Sin / Snl / Sds
! IC3PARS R.A. Public various parameters for use in IC4, handled as
! IC3PARS R.A. Public various parameters for use in IC3, handled as
! an array for simplicity
! IC4_KI R.A. Public KI (dissipation rate) values for use in IC4
! IC4_FC R.A. Public FC (frequency bin separators) for use in IC4
! IC4_KI R.A. Public KI (dissipation rate) values for use in IC4M6
! IC4_FC R.A. Public FC (frequency bin separators) for use in IC4M6
! IC4_CN R.A. Public Coefficients for use in IC4M2
! IC4_FMIN Real Public Minimum frequency below which ki is set to
! some background level dissipation (for S_ice)
! IC4_KIBK Real Public Low, background level dissipation (for S_ice)
! PFMOVE Real Public Tunable parameter in GSE correction
! for moving grids.
! GRIDSHIFT Real Public Grid offset for multi-grid w/SCRIP
Expand Down Expand Up @@ -615,7 +619,7 @@ MODULE W3GDATMD
IPARS = -1, NAUXGR
!
#ifdef W3_IC4
INTEGER, PARAMETER :: NIC4=10
INTEGER, PARAMETER :: NIC4=16 , NIC42=5
#endif
INTEGER, PARAMETER :: RLGTYPE = 1
INTEGER, PARAMETER :: CLGTYPE = 2
Expand Down Expand Up @@ -732,6 +736,8 @@ MODULE W3GDATMD
INTEGER, POINTER :: IC4PARS(:)
REAL, POINTER :: IC4_KI(:)
REAL, POINTER :: IC4_FC(:)
REAL, POINTER :: IC4_CN(:)
REAL :: IC4_FMIN, IC4_KIBK
#endif
#ifdef W3_IC5
REAL, POINTER :: IC5PARS(:)
Expand Down Expand Up @@ -1144,6 +1150,8 @@ MODULE W3GDATMD
INTEGER, POINTER :: IC4PARS(:)
REAL, POINTER :: IC4_KI(:)
REAL, POINTER :: IC4_FC(:)
REAL, POINTER :: IC4_CN(:)
REAL, POINTER :: IC4_FMIN, IC4_KIBK
#endif
#ifdef W3_IC5
REAL, POINTER :: IC5PARS(:)
Expand Down Expand Up @@ -1840,6 +1848,8 @@ SUBROUTINE W3DIMX ( IMOD, MX, MY, MSEA, NDSE, NDST &
CHECK_ALLOC_STATUS ( ISTAT )
ALLOCATE ( GRIDS(IMOD)%IC4_FC(NIC4), STAT=ISTAT )
CHECK_ALLOC_STATUS ( ISTAT )
ALLOCATE ( GRIDS(IMOD)%IC4_CN(NIC42), STAT=ISTAT )
CHECK_ALLOC_STATUS ( ISTAT )
#endif
#ifdef W3_IC5
ALLOCATE ( GRIDS(IMOD)%IC5PARS(9), STAT=ISTAT )
Expand Down Expand Up @@ -2308,6 +2318,9 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
IC4PARS => GRIDS(IMOD)%IC4PARS
IC4_KI => GRIDS(IMOD)%IC4_KI
IC4_FC => GRIDS(IMOD)%IC4_FC
IC4_CN => GRIDS(IMOD)%IC4_CN
IC4_FMIN => GRIDS(IMOD)%IC4_FMIN
IC4_KIBK => GRIDS(IMOD)%IC4_KIBK
#endif
#ifdef W3_IC5
IC5PARS => GRIDS(IMOD)%IC5PARS
Expand Down
15 changes: 12 additions & 3 deletions model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ MODULE W3GRIDMD
!/ 07-Jun-2021 : S_{nl} GKE NL5 (Q. Liu) ( version 7.13 )
!/ 19-Jul-2021 : Momentum and air density support ( version 7.14 )
!/ 28-Feb-2023 : GQM as an alternative for NL1 ( version 7.15 )
!/ 11-Jan-2024 : New namelist parameters for IC4 ( version 7.15 )
!/
!/ Copyright 2009-2013 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
Expand Down Expand Up @@ -764,9 +765,10 @@ MODULE W3GRIDMD

#ifdef W3_IC4
INTEGER :: IC4METHOD
REAL :: IC4KI(NIC4), IC4FC(NIC4)
REAL :: IC4KI(NIC4), IC4FC(NIC4), &
IC4CN(NIC42), IC4FMIN, IC4KIBK
#endif
!

#ifdef W3_IC5
REAL :: IC5MINIG, IC5MINWT, &
IC5MAXKRATIO, IC5MAXKI, IC5MINHW, &
Expand Down Expand Up @@ -968,7 +970,8 @@ MODULE W3GRIDMD
IC3VISC, IC3ELAS, IC3DENS, IC3HICE
#endif
#ifdef W3_IC4
NAMELIST /SIC4/ IC4METHOD, IC4KI, IC4FC
NAMELIST /SIC4/ IC4METHOD, IC4KI, IC4FC, IC4CN, IC4FMIN, &
IC4KIBK
#endif
#ifdef W3_IC5
NAMELIST /SIC5/ IC5MINIG, IC5MINWT, IC5MAXKRATIO, &
Expand Down Expand Up @@ -2877,6 +2880,9 @@ SUBROUTINE W3GRID()
IC4METHOD = 1 !switch for methods within IC4
IC4KI=0.0
IC4FC=0.0
IC4CN=0.0
IC4FMIN=0.0
IC4KIBK=0.0
#endif
!
#ifdef W3_IC5
Expand Down Expand Up @@ -5298,6 +5304,9 @@ SUBROUTINE W3GRID()
IC4PARS(1)=IC4METHOD
IC4_KI=IC4KI
IC4_FC=IC4FC
IC4_CN=IC4CN
IC4_FMIN=IC4FMIN
IC4_KIBK=IC4KIBK
#endif
!
#ifdef W3_IC5
Expand Down
8 changes: 4 additions & 4 deletions model/src/w3iogrmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1292,11 +1292,11 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
#endif
#ifdef W3_IC4
WRITE (NDSM) &
IC4PARS,IC4_KI,IC4_FC
IC4PARS,IC4_KI,IC4_FC,IC4_CN,IC4_FMIN,IC4_KIBK
#ifdef W3_ASCII
WRITE (NDSA,*) &
'IC4PARS,IC4_KI,IC4_FC:', &
IC4PARS,IC4_KI,IC4_FC
'IC4PARS,IC4_KI,IC4_FC,IC4_CN,IC4_FMIN,IC4_KIBK:', &
IC4PARS,IC4_KI,IC4_FC,IC4_CN,IC4_FMIN,IC4_KIBK
#endif
#endif
#ifdef W3_IC5
Expand Down Expand Up @@ -1338,7 +1338,7 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
#endif
#ifdef W3_IC4
READ (NDSM) &
IC4PARS,IC4_KI,IC4_FC
IC4PARS,IC4_KI,IC4_FC,IC4_CN,IC4_FMIN,IC4_KIBK
#endif
#ifdef W3_IC5
READ (NDSM) &
Expand Down
Loading