Skip to content

Pr gint test #1

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

Merged
merged 27 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
98c5702
Added boundary checks to the SMC grid input files for ww3_grid,
UKMO-lsampson Jun 8, 2020
71b9ba9
Fb 360 calendar (#8)
ukmo-juan-castillo Jul 16, 2020
6c42d17
RTD support for ww3_boun[dc] (#10)
ukmo-ccbunney Jul 28, 2020
5c361aa
Fb coupling time (#9)
ukmo-juan-castillo Jul 30, 2020
cc34122
Merge remote-tracking branch 'upstream/staging' into develop
Aug 7, 2020
33a7af3
bug fix for ukmet development
Aug 7, 2020
68c3c96
Merge remote-tracking branch 'upstream/develop' into develop
Oct 19, 2020
663d983
Merge remote-tracking branch 'upstream/develop' into develop
Oct 26, 2020
d4887f5
Merge remote-tracking branch 'upstream/develop' into develop
Jan 11, 2021
dc0cea9
Merge remote-tracking branch 'upstream/develop' into develop
Mar 4, 2021
c5d5b2c
Create pull_request_template.md (#330)
aliabdolali Mar 18, 2021
c26cd2a
Update issue templates (#329)
aliabdolali Mar 18, 2021
6d95c33
UKMO Staging jan2021 (#327)
ukmo-ccbunney Mar 19, 2021
23e5537
Merge remote-tracking branch 'upstream/develop' into develop
Mar 19, 2021
854fc86
Fb_global_unstr (#335)
aliabdolali Mar 22, 2021
8bf217e
Merge remote-tracking branch 'upstream/develop' into develop
Mar 23, 2021
78b0148
Fb matrix divider (#328)
aliabdolali Mar 24, 2021
64a27d6
Update NetCDF comp/link (#336)
JessicaMeixner-NOAA Mar 25, 2021
c4926b5
fixing issue #339 and adding usace regtest matrix (#340)
thesser1 Mar 26, 2021
76cc41f
Merge remote-tracking branch 'upstream/develop' into develop
Mar 26, 2021
fc3576f
Nan tide on equator (#222)
SanderHulst Mar 26, 2021
a436cb4
Changes to fix issue #341 (#342)
ukmo-juan-castillo Apr 1, 2021
2646f8c
:bug: ECMWF total weight <0.7 on zero meridian (#243)
SanderHulst Apr 20, 2021
0a6f4d2
Fb pdlib changes (#347)
thesser1 Apr 24, 2021
ff106db
Merge remote-tracking branch 'upstream/develop' into develop
Apr 27, 2021
0e4f885
Merge remote-tracking branch 'upstream/feature/nearest_interpolation'…
Apr 27, 2021
6172ed6
add ww3_gint and ww3_multi option to global unstr test tp2.21
Apr 27, 2021
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
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/add-development-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Add Development Request
about: Request that a new development be added to WW3
title: ''
labels: 'enhancement'
assignees: ''

---


23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve WW3
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Documentation request/update
about: Add new section in the documentation or report a type/mistake in the documentation
title: ''
labels: 'documentation'
assignees: ''

---

**Describe the section in the documentation that is missing or requires an update?**

**Report a bug/typo in the documentation**

**Link the issue(s) associated with this documentation update**

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for WW3
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. 

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
43 changes: 43 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Pull Request Summary
(Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.)
Please describe the PR summary

## Description
Provide a detailed description of what this PR does.
What bug does it fix, or what feature does it add?
Is a change of answers expected from this PR?

### Issue(s) addressed
* Is there an issue associated with this development (bug fix, enhancement, new feature)?
Please add a reference to a related issue(s) in WW3 repository (Follow [link](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)).
Link the issues to be closed with this PR, whether in this repository, or in another repository.
(Remember, issues should always be created before starting work on a PR branch!).
Note that properly "linked issues" (either automatic links, or manual ones using the correct keywords) will be automatically closed when the PR is merged.

- fixes #<issue_number>
- fixes noaa-emc/ww3/issues/<issue_number>

### Check list
* Is your feature branch up to date with the authoritative repository (NOAA/develop)?
* Make sure you have checked the [checklist for a developer submitting to develop](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-a-developer-submitting-to-develop), [checklist for a developer submitting to develop](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-a-developer-submitting-to-develop) and [updating version number](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-updating-version-number)
* Reviewers: @mentions of suggested reviewers of the proposed changes.


### Testing
* How were these changes tested?
* Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
* If a new feature was added, was a new regression test added?
* Have regression tests been run?
* Which compiler / HPC you used to run the regression tests in the PR?
* Please provide the summary output of matrix.comp (_matrix.Diff.out_, _matrixCompFull.out_ and _matrixCompSummary.out_):
Please indicate the expected changes in the outputs ([excluding the known list of non-identical tests](https://github.com/NOAA-EMC/WW3/wiki/How-to-use-matrix.comp-to-compare-regtests-with-master#4-look-at-results)).










4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ manual/*.toc
manual/*.out
manual/*.dvi
manual/*.pdf
model?
model??
regtests/list*
regtests/before
regtests/matrix*
regtests/*/work*
regtests/*/input*/*.nc
Expand Down
3 changes: 2 additions & 1 deletion model/bin/comp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
case $WWATCH3_NETCDF in
NC3) opt="$opt -I$NETCDF_INCDIR" ;;
NC4) if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
opt="$opt -I`$NETCDF_CONFIG --includedir`" ;;
#opt="$opt -I`$NETCDF_CONFIG --includedir`" ;;
opt="$opt `$NETCDF_CONFIG --cflags`" ;;
esac
fi

Expand Down
2 changes: 1 addition & 1 deletion model/bin/link.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
case $WWATCH3_NETCDF in
NC3) libs="$libs -L$NETCDF_LIBDIR -lnetcdf" ;;
NC4) if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
libs="$libs `$NETCDF_CONFIG --flibs`" ;;
libs="$libs `$NETCDF_CONFIG --flibs` `$NETCDF_CONFIG --libs`" ;;
esac
fi

Expand Down
12 changes: 11 additions & 1 deletion model/bin/make_makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,17 @@
prop=
source="w3parall w3triamd $stx $nlx $btx $is $uostmd"
IO='w3iogrmd'
aux="constants w3servmd w3arrymd w3dispmd w3gsrumd w3timemd w3nmlgridmd $pdlibyow $memcode" ;;
aux="constants w3servmd w3arrymd w3dispmd w3gsrumd w3timemd w3nmlgridmd $pdlibyow $memcode"
if [ "$scrip" = 'SCRIP' ]
then
aux="$aux scrip_constants scrip_grids scrip_iounitsmod"
aux="$aux scrip_remap_vars scrip_timers scrip_errormod scrip_interface"
aux="$aux scrip_kindsmod scrip_remap_conservative wmscrpmd"
fi
if [ "$scripnc" = 'SCRIPNC' ]
then
aux="$aux scrip_netcdfmod scrip_remap_write scrip_remap_read"
fi ;;
ww3_strt) IDstring='Initial conditions program'
core=
data="$memcode w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd"
Expand Down
5 changes: 3 additions & 2 deletions model/bin/w3_make
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@

# GRID STRT BOUND OUTF OUTP TRCK GRIB GINT GX* UPRSTR LIBWW3
# reg_programs = non-NetCDF programs
reg_programs="ww3_grid"
reg_programs="$reg_programs ww3_strt"
reg_programs="ww3_strt"
reg_programs="$reg_programs ww3_bound"
reg_programs="$reg_programs ww3_outf"
reg_programs="$reg_programs ww3_outp"
Expand Down Expand Up @@ -171,6 +170,7 @@
# MULTI MULTI_ESMF SBS1
if [ -n "`grep SCRIPNC $switch_file`" ] || [ -n "`grep OASIS $switch_file`" ] || [ -n "`grep PDLIB $switch_file`" ]
then
cdf_programs="$cdf_programs ww3_grid"
cdf_programs="$cdf_programs ww3_multi"
cdf_programs="$cdf_programs ww3_sbs1"
cdf_programs="$cdf_programs libww3"
Expand All @@ -179,6 +179,7 @@
cdf_programs="$cdf_programs ww3_multi_esmf"
fi
else
reg_programs="$reg_programs ww3_grid"
reg_programs="$reg_programs ww3_multi"
reg_programs="$reg_programs ww3_sbs1"
reg_programs="$reg_programs libww3"
Expand Down
4 changes: 2 additions & 2 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
curr_dir=`pwd`

# Set WW3 code version
ww3ver=v7.07
ww3ver=v7.12.1

#Get top level directory of ww3 from user:
echo -e "\n\n This script will download data from the ftp for WAVEWATCH III "
Expand Down Expand Up @@ -51,7 +51,7 @@ cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM6
cp -r data_regtests/ww3_tp2.14/input/toy/*.nc regtests/ww3_tp2.14/input/toy/
cp -r data_regtests/ww3_tp2.17/input/* regtests/ww3_tp2.17/input/

cp -r data_regtests/ww3_tp2.21/input/* regtests/ww3_tp2.21/input/

#Do you want to clean up (aka delete tar file, delete the data_regtests directory)
echo -e "\n\n Do you want to delete the tar file ww3_from_ftp.${ww3ver}.tar.gz [y|n]: "
Expand Down
42 changes: 42 additions & 0 deletions model/ftn/PDLIB/yowpdlibmain.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,7 @@ module yowpdlibMain
implicit none
integer I1, I2, I3, stat, IE, NI(3)
real(rkind) :: DXP1, DXP2, DXP3, DYP1, DYP2, DYP3, DBLTMP, TRIA03
logical :: CROSSES_DATELINE

allocate(PDLIB_SI(npa), PDLIB_CCON(npa), PDLIB_IEN(6,ne), PDLIB_TRIA(ne), stat=stat)
if(stat/=0) call parallel_abort('SI allocation failure')
Expand All @@ -1163,6 +1164,12 @@ module yowpdlibMain
DYP2=y(I3) - y(I2)
DXP3=x(I1) - x(I3)
DYP3=y(I1) - y(I3)
CALL ELEMENT_CROSSES_DATELINE(DXP1, DXP2, DXP3, CROSSES_DATELINE)
IF (CROSSES_DATELINE) THEN
CALL CORRECT_DX_GT180(DXP1)
CALL CORRECT_DX_GT180(DXP2)
CALL CORRECT_DX_GT180(DXP3)
ENDIF

PDLIB_IEN(1,IE) = - DYP2
PDLIB_IEN(2,IE) = DXP2
Expand All @@ -1185,6 +1192,41 @@ module yowpdlibMain
end subroutine
!**********************************************************************
!* *
!**********************************************************************
subroutine ELEMENT_CROSSES_DATELINE(RX1, RX2, RX3, CROSSES_DATELINE)
! Purpose: understanding if an element crosses the dateline.
! An element crossing the dateline has, e.g. a node with lon < 180
! and another 2 with lon > -180
IMPLICIT NONE
REAL(rkind), INTENT(IN) :: RX1, RX2, RX3
LOGICAL, INTENT(OUT) :: CROSSES_DATELINE
INTEGER :: R1GT180, R2GT180, R3GT180
R1GT180 = MERGE(1, 0, ABS(RX1).GT.180)
R2GT180 = MERGE(1, 0, ABS(RX2).GT.180)
R3GT180 = MERGE(1, 0, ABS(RX3).GT.180)
! if R1GT180+R2GT180+R3GT180 .eq. 0 the element does not cross the dateline
! if R1GT180+R2GT180+R3GT180 .eq. 1 the element contains the pole
! if R1GT180+R2GT180+R3GT180 .eq. 2 the element crosses the dateline
CROSSES_DATELINE = R1GT180+R2GT180+R3GT180 .EQ. 2
end subroutine
!**********************************************************************
!* *
!**********************************************************************
subroutine CORRECT_DX_GT180(DXP)
! Purpose: the absolute zonal distance between 2 points is always <= 180
! This subroutine corrects the zonal distance to satifsy
! this requirement
IMPLICIT NONE
REAL(rkind), INTENT(INOUT) :: DXP
IF (DXP .le. -180) THEN
DXP=DXP + 360
END IF
IF (DXP .ge. 180) THEN
DXP=DXP - 360
END IF
end subroutine
!**********************************************************************
!* *
!**********************************************************************
subroutine ComputeIA_JA_POSI_NNZ
use yowElementpool, only: ne, ne_global, INE, ielg
Expand Down
4 changes: 4 additions & 0 deletions model/ftn/SCRIP/scrip_grids.f
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ module scrip_grids
& special_polar_cell1, ! cell with only 1 corner at pole
& special_polar_cell2 !

integer (SCRIP_i4), dimension(:), allocatable, target,save ::
& grid1_imask, ! flag which cells participate
& grid2_imask ! flag which cells participate

real (SCRIP_r8), dimension(:), allocatable, target, save ::
& grid1_center_lat, ! lat/lon coordinates for
& grid1_center_lon, ! each grid center in radians
Expand Down
6 changes: 5 additions & 1 deletion model/ftn/w3gsrumd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -3726,10 +3726,14 @@
IF ( K .EQ. 1 ) THEN
SIGN1 = SIGN(ONE,CROSS)
ELSE
IF ( SIGN(ONE,CROSS) .NE. SIGN1 ) THEN
! If point lies along a border, the cross product
! is zero and its sign is not well defined
IF ( ABS(CROSS) .GT. LEPS ) THEN
IF ( SIGN(ONE,CROSS) .NE. SIGN1 ) THEN
LSBC = .FALSE.
CYCLE SUBCELL_LOOP
END IF
END IF
END IF
END DO !K
IF ( LSBC ) RETURN
Expand Down
4 changes: 2 additions & 2 deletions model/ftn/w3iopomd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
INTEGER :: IX1, IY1, IXS, IYS
!/S INTEGER, SAVE :: IENT = 0
!/O7a INTEGER :: IX0, IXN, IY0, IYN, NNX, &
!/O7a KX, KY, JX, IIX
!/O7a KX, KY, JX, IIX, IX2, IY2, IS1
INTEGER :: IX(4), IY(4) ! Indices of points used in interp.
REAL :: RD(4) ! Interpolation coefficient
!/O7a REAL :: RD1, RD2, RDTOT, ZBOX(4), DEPTH
Expand Down Expand Up @@ -392,7 +392,7 @@
!/O7a RD(4)*ZBOX(4) ) / RDTOT
!/O7a WRITE (SCREEN,943) DEPTH
!
!/O7a *** implementation of O7a option with curvilinear grids is incomplete ***
!/O7a ! *** implementation of O7a option with curvilinear grids is incomplete ***
!
!/O7a IF ( RD1 .LT. 0.05 ) IX2 = IX1
!/O7a IF ( RD1 .GT. 0.95 ) IX1 = IX2
Expand Down
4 changes: 2 additions & 2 deletions model/ftn/w3odatmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,9 @@
!/MPI RSBLKS => OUTPTS(IMOD)%OUT4%RSBLKS
!/MPI IF ( NRQRS .NE. 0 ) THEN
!/MPI IRQRS => OUTPTS(IMOD)%OUT4%IRQRS
!/MPI IRQRSS => OUTPTS(IMOD)%OUT4%IRQRSS
!/MPI VAAUX => OUTPTS(IMOD)%OUT4%VAAUX
!/MPI END IF
!/MPI IRQRSS => OUTPTS(IMOD)%OUT4%IRQRSS
!/MPI VAAUX => OUTPTS(IMOD)%OUT4%VAAUX
!
NBI => OUTPTS(IMOD)%OUT5%NBI
NBI2 => OUTPTS(IMOD)%OUT5%NBI2
Expand Down
21 changes: 16 additions & 5 deletions model/ftn/w3tidemd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,20 @@
REAL(KIND=4), PARAMETER :: PI=3.1415926536
REAL(KIND=4), PARAMETER :: TWOPI=2.*3.1415926536

REAL :: SLAT, VDBL, RR, SUMC, SUMS, UUDBL, UU
REAL :: SLAT, VDBL, RR, SUMC, SUMS, UUDBL, UU, CXLAT
INTEGER :: IUU, IV

SLAT=SIN(PI*XLAT/180.)
! This comment was taken from t_tide, a matlab tidal prediction suite
!
! Apparently the second-order terms in the tidal potential go to zero
! at the equator, but the third-order terms do not. Hence when trying
! to infer the third-order terms from the second-order terms, the
! nodal correction factors blow up. In order to prevent this, it is
! assumed that the equatorial forcing is due to second-order forcing
! OFF the equator, from about the 5 degree location. Latitudes are
! hence (somewhat arbitrarily) forced to be no closer than 5 deg to
! the equator, as per note in Foreman.
CXLAT = MAX(ABS(XLAT), 5.)
SLAT=SIN(PI*CXLAT/180.)

JBASE=0
! All
Expand Down Expand Up @@ -1869,12 +1879,13 @@
REAL(KIND=4), PARAMETER :: TWOPI=2.*3.1415926536
!
REAL :: SLAT, VDBL, VV, SUMC, SUMS, RR, &
UUDBL, UU
UUDBL, UU, CXLAT
REAL(KIND=8) :: d1,h,pp,s,p,enp,dh,dpp,ds,dp,dnp,hh,tau

INTEGER :: indx(170)

SLAT=SIN(PI*XLAT/180.)
CXLAT = MAX(ABS(XLAT), 5.)
SLAT=SIN(PI*CXLAT/180.)
!
!***********************************************************************
!* THE ASTRONOMICAL ARGUMENTS ARE CALCULATED BY LINEAR APPROXIMATION
Expand Down
Loading