Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d7da32e
first commit of bydbr physics
jkousal32 Jun 4, 2025
7f58f0a
bugfix, ecWAM with new bydbr physics now returning reasonable results
jkousal32 Jun 5, 2025
49940fd
small code tidy
jkousal32 Jun 6, 2025
8ee35e4
freq cut off bydbr;formatting;CGROUP thru implsch;test w/o iterations…
jkousal32 Jun 11, 2025
af9a343
add frcutindex_bydb
jkousal32 Aug 14, 2025
dc75235
bring SINPUT_BYDBR into SINFLX_BYDBR
jkousal32 Aug 14, 2025
f9a5893
contents of sinput_bydbr.F90 moved within sinflx_bydbr.F90
jkousal32 Aug 15, 2025
5059abd
bugfix on CHRNCK
jkousal32 Aug 19, 2025
ceef4ab
tidy of moving of sinput_bydbr into sinflx
jkousal32 Oct 1, 2025
680711e
output extra ocean parameters
jkousal32 Oct 2, 2025
6c8657a
bug fix and temporary fix on FRIC=32
jkousal32 Oct 9, 2025
04029f5
implement different flavors of airsea for ZBRY
jkousal32 Oct 13, 2025
54bc68e
airsea_iter.F90 replaced by airsea_zbry.F90
jkousal32 Oct 13, 2025
42d2b3f
remove unnecessary line
jkousal32 Oct 14, 2025
ebccf9c
renaming bydbr to zbry
jkousal32 Oct 14, 2025
6cbecd7
renaming bydbr to zbry
jkousal32 Oct 14, 2025
069e617
correct zbry implementation for NGST=1
jkousal32 Oct 14, 2025
17291df
bugfix on SIG_U10
jkousal32 Oct 14, 2025
79e99e5
for IPHYS2_AIRSEA=0, diagnose CD directly from U10 & UFRIC
jkousal32 Oct 14, 2025
df58475
further bugfix on implementation NGST=1
jkousal32 Oct 14, 2025
bec8006
diagnose CD; output UPROXY
jkousal32 Oct 14, 2025
428dbf6
bydbr config file replaced with zbry
jkousal32 Oct 14, 2025
06abc33
small tidy
jkousal32 Oct 14, 2025
ab7349a
add low winds parameterization from Mohammed Yasrab
jkousal32 Oct 14, 2025
baefb1c
rename IPHYS2_LOWWINDS to LLLOWWINDS
jkousal32 Oct 15, 2025
6ce3296
small tidy
jkousal32 Oct 15, 2025
bb20eb0
bring IJ loops within (SINFLX_ZBRY)
jkousal32 Oct 15, 2025
3e7e139
bring IJ loops within (S*DISSIP_ZBRY); bring zbry wave phys vars into…
jkousal32 Oct 16, 2025
d51792b
iron out a bug in IJ looping; clean up
jkousal32 Oct 16, 2025
f5f3a9e
forgot to index A (action) spectrum
jkousal32 Oct 16, 2025
014024a
set FRIC=32 to keep equivalency with ST6-WW3
jkousal32 Oct 17, 2025
1a0944f
merge frcutindex routines
jkousal32 Oct 17, 2025
e7d28f1
tidy up some comments
jkousal32 Oct 17, 2025
1065e24
small reorganization
jkousal32 Oct 17, 2025
7de500d
reorganize NGST, CDFAC
jkousal32 Oct 20, 2025
549f543
fix typo
jkousal32 Oct 20, 2025
a856eea
revert and tidy CDFAC & FRIC dealings
jkousal32 Oct 21, 2025
31dc2c7
extend CALCPHIWA for high frequencies
jkousal32 Oct 21, 2025
4b44f4b
correct ZPI bug
jkousal32 Oct 21, 2025
c5dd1ec
IPHYS=2 doesn't need special treatment
jkousal32 Oct 21, 2025
a47876a
update my test cases with handy variables
jkousal32 Oct 21, 2025
8411e15
update IPHYS2_AIRSEA cases
jkousal32 Oct 21, 2025
7051269
add IPHYS2 nameless options and print statements
jkousal32 Oct 21, 2025
43b0b6a
add some informative comments
jkousal32 Oct 22, 2025
a5bce9b
bugfix on new namelists entries
jkousal32 Oct 22, 2025
e956eb1
replace high frequency contribution with analytic solution in CALCPHIWA
jkousal32 Oct 22, 2025
c339a29
correct CALCPHIWA calculation?
jkousal32 Oct 22, 2025
4782ea7
correct CALCPHIWA calculation
jkousal32 Oct 23, 2025
5c330d3
do the same high frequency contribution technique for TAU_WAVE_ATMOS
jkousal32 Oct 23, 2025
62e7aa7
I think this is the correct implementation to include CINV for TAU in…
jkousal32 Oct 23, 2025
d69e088
cleanup allocations of LFACTOR
jkousal32 Oct 23, 2025
4e1c750
redundant file lfactor.new
jkousal32 Oct 23, 2025
2c59e27
move LFACTOR frequency related things into YOWFRED
jkousal32 Oct 24, 2025
3d2d672
correct high frequency contribution in tau_wave_atmos
jkousal32 Oct 24, 2025
e51a2c3
how I believe lfactor should be, although something must be wrong in …
jkousal32 Oct 24, 2025
c57969f
keep two versions of lfactor
jkousal32 Oct 24, 2025
fcc523d
post hoc merge conflict fix for airsea
jkousal32 Oct 27, 2025
6d9c93a
more bugfixes on lfactor_wvei, but still not quite there...
jkousal32 Oct 28, 2025
0ce1ecd
zbry, set FRQMAX=10 always
jkousal32 Oct 28, 2025
c86c955
remove uproxy output because it conflicts with the same arguments/fun…
jkousal32 Oct 28, 2025
37d2a24
more fixes lfactor_wvei, still broken
jkousal32 Oct 29, 2025
ca76de5
update to use angular frequency everywhere
jkousal32 Oct 29, 2025
b173907
bugfix on DF
jkousal32 Oct 29, 2025
8367a37
define some constants that might be needed in the initialization of t…
jkousal32 Oct 29, 2025
e837ffc
set NGST=1 for all IPHYS2_AIRSEA for clean testing
jkousal32 Oct 31, 2025
f2479a0
should use WN2 instead of WAVNUM for operations with D
jkousal32 Nov 2, 2025
fcedff7
ZCDFAC pass in thru nml
jkousal32 Nov 2, 2025
32acfea
add ZCDFAC to namelist
jkousal32 Nov 2, 2025
29f6a97
default zcdfac=1.0
jkousal32 Nov 10, 2025
2464789
avoid duplication of kinematic viscosity of water
jkousal32 Nov 14, 2025
5cc7338
delete unnecessary Z0GST
jkousal32 Nov 14, 2025
519d125
add a reasonable default Z0B to enable LWCOUHMF for ZBRY
jkousal32 Mar 9, 2026
1799cb3
major restructure for ZBRY to homogenize with ecWAM
jkousal32 Apr 24, 2026
9cc9ec4
handle allocation in initmdl
jkousal32 Apr 28, 2026
421765b
proper indexing and loops
jkousal32 Apr 28, 2026
cc3c78c
refactoring for efficiency
jkousal32 Apr 28, 2026
7e76673
tidy up in/out & comment documentation thereof
jkousal32 Apr 29, 2026
90ab549
further optimizations and refactorizations
jkousal32 Apr 29, 2026
d73ed52
tauwinds into tauwindsxy for efficiency
jkousal32 Apr 29, 2026
8d05114
modify indentation
jkousal32 Apr 29, 2026
e11b026
minor aesthetic tidy
jkousal32 Apr 29, 2026
55ac7a6
renaming of zbry to bydrz
jkousal32 Apr 29, 2026
ec10162
iterative scheme simplification for IPHYS2_AIRSEA=3; indentation
jkousal32 Apr 29, 2026
4f2ca92
Update src/ecwam/sinput_jan.F90
jkousal32 Apr 30, 2026
081aaf5
Update src/ecwam/airsea_jan.F90
jkousal32 Apr 30, 2026
194abdf
update comments
jkousal32 Apr 30, 2026
080a571
remove dummy inits
jkousal32 Apr 30, 2026
05e8b50
setup initializations cleanly for different physics
jkousal32 May 5, 2026
c202a3c
address B1 issue
jkousal32 May 5, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ ecbundle
*.DS_Store
.vscode
*.mod
x*.sh
__pycache__/

4 changes: 4 additions & 0 deletions share/ecwam/scripts/ecwam_run_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ wamnfre=$(read_config frequencies)

nproma=$(read_config nproma --default=24)
iphys=$(read_config iphys --default=1)
iphys2_airsea=$(read_config iphys2_airsea --default=0)
llgcbz0=$(read_config llgcbz0 --default=F)
llnormagam=$(read_config llnormagam --default=F)
lllowwinds=$(read_config lllowwinds --default=F)
irefra=$(read_config irefra --default=0)
lciwa1=$(read_config lciwa1 --default=F)
lciwa2=$(read_config lciwa2 --default=F)
Expand Down Expand Up @@ -228,12 +230,14 @@ cat > wam_namelist << EOF
LFDBIOOUT = F,
LFDB = F,
IPHYS = ${iphys},
IPHYS2_AIRSEA = ${iphys2_airsea},
ISHALLO = 0,
ISNONLIN = 0,
LBIWBK = T,
LLCAPCHNK = T,
LLGCBZ0 = ${llgcbz0},
LLNORMAGAM = ${llnormagam},
LLLOWWINDS = ${lllowwinds},
IPROPAGS = 2,
LSUBGRID = F,
IREFRA = ${irefra},
Expand Down
11 changes: 11 additions & 0 deletions src/ecwam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ list( APPEND ecwam_srcs
abort1.F90
adjust.F90
airsea.F90
airsea_jan.F90
airsea_bydrz.F90
aki.F90
aki_ice.F90
alphap_tail.F90
bouinpt.F90
buildstress.F90
calcphiwa.F90
cal_second_order_spec.F90
cdustarz0.F90
check.F90
Expand Down Expand Up @@ -100,6 +103,7 @@ list( APPEND ecwam_srcs
incdate.F90
inisnonlin.F90
init_fieldg.F90
init_freqext.F90
init_sdiss_ardh.F90
init_x0tauhf.F90
initdpthflds.F90
Expand All @@ -120,6 +124,7 @@ list( APPEND ecwam_srcs
ktoobs.F90
kurtosis.F90
kzeone.F90
lfactor.F90
makegrid.F90
mblock.F90
mbounc.F90
Expand Down Expand Up @@ -217,6 +222,7 @@ list( APPEND ecwam_srcs
sdissip.F90
sdissip_ard.F90
sdissip_jan.F90
sdissip_bydrz.F90
sdiwbk.F90
sdice.F90
sdice1.F90
Expand All @@ -238,6 +244,8 @@ list( APPEND ecwam_srcs
setmarstype.F90
setwavphys.F90
sinflx.F90
sinflx_bydrz.F90
sinflx_ard_jan.F90
sinput.F90
sinput_ard.F90
sinput_jan.F90
Expand All @@ -252,10 +260,13 @@ list( APPEND ecwam_srcs
stress_gc.F90
stresso.F90
strspec.F90
swldissip_bydrz.F90
tables_2nd.F90
tabu_swellft.F90
tau_phi_hf.F90
tau_wave_atmos.F90
taut_z0.F90
tauwindsxy.F90
topoar.F90
transf.F90
transf_bfi.F90
Expand Down
82 changes: 31 additions & 51 deletions src/ecwam/airsea.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@ SUBROUTINE AIRSEA (KIJS, KIJL, &
!** INTERFACE.
! ----------

! *CALL* *AIRSEA (KIJS, KIJL, FL1, WAVNUM,
! HALP, U10, U10DIR, TAUW, TAUWDIR, RNFAC,
! US, Z0, Z0B, CHRNCK, ICODE_WND, IUSFG)*
! *CALL* *AIRSEA (KIJS, KIJL,
! U10, U10DIR, TAUW, TAUWDIR,
! US, Z0, Z0B, CHRNCK, ICODE_WND, IUSFG,
! HALP, RNFAC)*

! *KIJS* - INDEX OF FIRST GRIDPOINT.
! *KIJL* - INDEX OF LAST GRIDPOINT.
! *FL1* - SPECTRA
! *WAVNUM* - WAVE NUMBER
! *HALP* - 1/2 PHILLIPS PARAMETER
! *U10* - WINDSPEED U10.
! *U10DIR* - WINDSPEED DIRECTION.
! *TAUW* - WAVE STRESS.
! *TAUWDIR* - WAVE STRESS DIRECTION.
! *RNFAC* - WIND DEPENDENT FACTOR USED IN THE GROWTH RENORMALISATION.
! *US* - OUTPUT OR OUTPUT BLOCK OF FRICTION VELOCITY.
! *Z0* - OUTPUT BLOCK OF ROUGHNESS LENGTH.
! *Z0B* - BACKGROUND ROUGHNESS LENGTH.
Expand All @@ -52,6 +49,8 @@ SUBROUTINE AIRSEA (KIJS, KIJL, &
! US: ICODE_WND=1 OR 2 --> U10 will be updated
! *IUSFG* - IF = 1 THEN USE THE FRICTION VELOCITY (US) AS FIRST GUESS in TAUT_Z0
! 0 DO NOT USE THE FIELD US
! *HALP* - OPTIONAL 1/2 PHILLIPS PARAMETER (required for JAN branch).
! *RNFAC* - OPTIONAL WIND-DEPENDENT GROWTH RENORMALISATION FACTOR (required for JAN branch).


! ----------------------------------------------------------------------
Expand All @@ -62,20 +61,22 @@ SUBROUTINE AIRSEA (KIJS, KIJL, &
USE YOWPHYS, ONLY : XKAPPA, XNLEV
USE YOWTEST, ONLY : IU06
USE YOWWIND, ONLY : WSPMIN
USE YOWSTAT, ONLY : IPHYS

USE YOMHOOK, ONLY: LHOOK, DR_HOOK, JPHOOK

! ----------------------------------------------------------------------
IMPLICIT NONE

#include "abort1.intfb.h"
#include "taut_z0.intfb.h"
#include "z0wave.intfb.h"
#include "airsea_jan.intfb.h"
#include "airsea_bydrz.intfb.h"

INTEGER(KIND=JWIM), INTENT(IN) :: KIJS, KIJL, ICODE_WND, IUSFG
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (IN) :: HALP, U10DIR, TAUW, TAUWDIR, RNFAC
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (INOUT) :: U10, US
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (OUT) :: Z0, Z0B, CHRNCK
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (IN), OPTIONAL :: HALP, RNFAC
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (IN) :: U10DIR, TAUW, TAUWDIR
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (INOUT) :: U10, US, CHRNCK
REAL(KIND=JWRB), DIMENSION(KIJL), INTENT (OUT) :: Z0, Z0B

INTEGER(KIND=JWIM) :: IJ, I, J

Expand All @@ -87,45 +88,24 @@ SUBROUTINE AIRSEA (KIJS, KIJL, &
! ----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK ('AIRSEA', 0, ZHOOK_HANDLE)

!* 2. DETERMINE TOTAL STRESS (if needed)
! ----------------------------------

IF (ICODE_WND == 3) THEN

!$loki inline
CALL TAUT_Z0 (KIJS, KIJL, IUSFG, &
& HALP, U10, U10DIR, TAUW, TAUWDIR, RNFAC, &
& US, Z0, Z0B, CHRNCK)

ELSEIF (ICODE_WND == 1 .OR. ICODE_WND == 2) THEN

!$loki remove
!* 3. DETERMINE ROUGHNESS LENGTH (if needed).
! ---------------------------

!$loki inline
CALL Z0WAVE (KIJS, KIJL, US, TAUW, U10, Z0, Z0B, CHRNCK)

!* 3. DETERMINE U10 (if needed).
! ---------------------------

XKAPPAD = 1.0_JWRB / XKAPPA
XLOGLEV = LOG (XNLEV)

DO IJ = KIJS, KIJL
U10 (IJ) = XKAPPAD * US (IJ) * (XLOGLEV - LOG (Z0 (IJ)))
U10 (IJ) = MAX (U10 (IJ), WSPMIN)
ENDDO

!$loki end remove
ELSE
WRITE (IU06, * ) ' ++++++++++++++++++++++++++++++++++++++++++'
WRITE (IU06, * ) ' + AIRSEA : INVALID VALUE OF ICODE_WND +'
WRITE (IU06, * ) ' ICODE_WND = ', ICODE_WND
WRITE (IU06, * ) ' ++++++++++++++++++++++++++++++++++++++++++'
CALL ABORT1
ENDIF

SELECT CASE (IPHYS)
CASE(0,1)
IF ((.NOT.PRESENT(HALP)) .OR. (.NOT.PRESENT(RNFAC))) THEN
WRITE (IU06, * ) ' ++++++++++++++++++++++++++++++++++++++++++'
WRITE (IU06, * ) ' + AIRSEA : HALP/RNFAC REQUIRED FOR JAN +'
WRITE (IU06, * ) ' ++++++++++++++++++++++++++++++++++++++++++'
CALL ABORT1
ENDIF
CALL AIRSEA_JAN (KIJS, KIJL, &
& HALP, U10, U10DIR, TAUW, TAUWDIR, RNFAC, &
& US, Z0, Z0B, CHRNCK, ICODE_WND, IUSFG)
CASE(2)
CALL AIRSEA_BYDRZ(KIJS, KIJL, &
& U10, U10DIR, TAUW, TAUWDIR, &
& US, Z0, Z0B, CHRNCK, ICODE_WND, IUSFG)

END SELECT

IF (LHOOK) CALL DR_HOOK ('AIRSEA', 1, ZHOOK_HANDLE)

END SUBROUTINE AIRSEA
Loading
Loading