Skip to content

Commit

Permalink
UKMO Staging (Oct 2020) (NOAA-EMC#264)
Browse files Browse the repository at this point in the history
* Fb oasis t+0 (#13)

In the original code a coupling lag had to be used, coupling took place at the last time step but not at the first, and the coupling fields had to be written in an oasis restart file. With this ticket, the program can run in a different way by not using a coupling lag, coupling taking place at the first time step but not the last, and the coupling fields are written in the wave restart file - no extra oasis restart file needed.

* Fb uprstr inp (#15)

Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file

* Bf unconforming where in coupling routines (#17)

* Fix non-conforming WHERE statements in coupled routines
* Stop comparing history lines in OASIS rmp files

* Changes for efficient SMC grid coupling (#16)

* Changes for efficient SMC grid coupling
* Ensure consistency between SMC coupled test nml and inp files

Co-authored-by: Juan Manuel Castillo Sanchez <48921434+ukmo-juan-castillo@users.noreply.github.com>
Co-authored-by: Andy Saulter <48921142+ukmo-ansaulter@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 5, 2020
1 parent 9735c7d commit e756361
Show file tree
Hide file tree
Showing 81 changed files with 18,881 additions and 976 deletions.
3 changes: 2 additions & 1 deletion model/bin/make_makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@
source="$memcode $pdlibcode $pdlibyow $flx $ln $st $nl $bt $ic $is $db $tr $bs $xx $uostmd"
IO='w3iogrmd w3iogomd w3iorsmd'
aux="constants w3servmd w3timemd w3arrymd w3dispmd w3gsrumd"
aux="$aux w3parall" ;;
aux="$aux w3parall w3nmluprstrmd" ;;
esac

# if esmf is included in program name, then
Expand Down Expand Up @@ -1374,6 +1374,7 @@
'W3NMLBOUNCMD' ) modtest=w3nmlbouncmd.o ;;
'W3NMLSHELMD' ) modtest=w3nmlshelmd.o ;;
'W3NMLGRIDMD' ) modtest=w3nmlgridmd.o ;;
'W3NMLUPRSTRMD' ) modtest=w3nmluprstrmd.o ;;
'W3NETCDF' ) modtest=w3netcdf.o ;;
'YOWFUNCTION' ) modtest=yowfunction.o ;;
'YOWDATAPOOL' ) modtest=yowdatapool.o ;;
Expand Down
5 changes: 4 additions & 1 deletion model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cp -r data_regtests/ww3_tp2.12/input/* regtests/ww3_tp2.12/input/
cp -r data_regtests/ww3_tp2.12/input_be/* regtests/ww3_tp2.12/input_be/
cp -r data_regtests/ww3_tp2.12/input_le/* regtests/ww3_tp2.12/input_le/
cp -r data_regtests/ww3_tp2.14/input/r-ww3.nc.OAS*CM regtests/ww3_tp2.14/input/
cp -r data_regtests/ww3_tp2.14/input/r-ww3.nc.OASACM regtests/ww3_tp2.14/input/OASACM2
cp -r data_regtests/ww3_tp2.14/input/r-ww3.nc.OASACM regtests/ww3_tp2.14/input/r-ww3.nc.OASACM2
cp -r data_regtests/ww3_tp2.14/input/rmp_* regtests/ww3_tp2.14/input/
if [ ! -d regtests/ww3_tp2.14/input/oasis3-mct/doc ]
then
mkdir regtests/ww3_tp2.14/input/oasis3-mct/doc
Expand All @@ -46,6 +46,9 @@ cp -r data_regtests/ww3_tp2.14/input/oasis3-mct/doc/* regtests/ww3_tp2.14/input/
cp -r data_regtests/ww3_tp2.14/input/toy/*.nc.OAS*CM regtests/ww3_tp2.14/input/toy/
cp -r data_regtests/ww3_tp2.14/input/toy/r-toy.nc.OASACM regtests/ww3_tp2.14/input/toy/r-toy.nc.OASACM2
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM2
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM4
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM5
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/

Expand Down
11 changes: 5 additions & 6 deletions model/ftn/w3agcmmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
DO JSEA=1, NSEAL
ISEA=IAPROC+(JSEA-1)*NAPROC
IF(CY(ISEA) /= UNDEF) TMP(JSEA)=CY(ISEA)
TMP(JSEA)=CY(ISEA)
END DO
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
Expand All @@ -146,7 +145,7 @@
! ---------------------------------------------------------------------
IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_ACHA') THEN
TMP(1:NSEAL) = 0.0
WHERE(CHARN /= UNDEF) TMP=CHARN
WHERE(CHARN(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=CHARN(1:NSEAL)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
ENDIF
Expand All @@ -155,7 +154,7 @@
! ---------------------------------------------------------------------
IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__AHS') THEN
TMP(1:NSEAL) = 0.0
WHERE(HS /= UNDEF) TMP=HS
WHERE(HS(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=HS(1:NSEAL)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
ENDIF
Expand All @@ -164,7 +163,7 @@
! ---------------------------------------------------------------------
IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3___FP') THEN
TMP(1:NSEAL) = 0.0
WHERE(FP0 /= UNDEF) TMP=FP0
WHERE(FP0(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=FP0(1:NSEAL)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
ENDIF
Expand All @@ -173,7 +172,7 @@
! ---------------------------------------------------------------------
IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3___TP') THEN
TMP(1:NSEAL) = 0.0
WHERE(FP0 /= UNDEF) TMP=1./FP0
WHERE(FP0(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=1./FP0(1:NSEAL)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
ENDIF
Expand All @@ -182,7 +181,7 @@
! ---------------------------------------------------------------------
IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__FWS') THEN
TMP(1:NSEAL) = 0.0
WHERE(TWS /= UNDEF) TMP=TWS
WHERE(TWS(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TWS(1:NSEAL)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)
ENDIF
Expand Down
8 changes: 5 additions & 3 deletions model/ftn/w3fldsmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
!/ | Last update : 24-Apr-2015 |
!/ | Last update : 25-Sep-2020 |
!/ +-----------------------------------+
!/
!/ 15-Jan-1999 : Final FORTRAN 77 ( version 1.18 )
Expand All @@ -929,6 +929,7 @@
!/ 26-Dec-2012 : Modified obsolete declarations. ( version 4.11 )
!/ 24-Apr-2015 : Adding OASIS coupling calls ( version 5.07 )
!/ (M. Accensi & F. Ardhuin, IFREMER)
!/ 25-Sep-2020 : Receive coupled fields at T+0 ( version 7.xx )
!/
! 1. Purpose :
!
Expand Down Expand Up @@ -1020,7 +1021,7 @@
!/
!/S USE W3SERVMD, ONLY: STRACE
USE W3TIMEMD
!/OASIS USE W3OACPMD, ONLY: ID_OASIS_TIME
!/OASIS USE W3OACPMD, ONLY: ID_OASIS_TIME, CPLT0
!/OASACM USE W3AGCMMD, ONLY: RCV_FIELDS_FROM_ATMOS
!/OASOCM USE W3OGCMMD, ONLY: RCV_FIELDS_FROM_OCEAN
!/OASICM USE W3IGCMMD, ONLY: RCV_FIELDS_FROM_ICE
Expand Down Expand Up @@ -1164,7 +1165,8 @@
!/OASIS IF (FLCOUPL) THEN
!/OASIS ! Do not receive coupling fields at the end of the first integration time in case of
!/OASIS ! forcing with a non interpolated field (like lev, ice, ...)
!/OASIS IF ((ID_OASIS_TIME.EQ.0 .AND. FLFRST) .OR. (ID_OASIS_TIME.GT.0)) THEN
!/OASIS IF ( (ID_OASIS_TIME.EQ.0 .AND. ( FLFRST .OR. CPLT0 )) .OR. &
!/OASIS (ID_OASIS_TIME.GT.0)) THEN
!
!/OASACM ! Getting U10 (FXN) and V10 (FYN) from atmospheric model
!/OASACM CALL RCV_FIELDS_FROM_ATMOS(COUPL_COMM, &
Expand Down
4 changes: 2 additions & 2 deletions model/ftn/w3igcmmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@

CASE ('WW3_TWIX')
TMP(1:NSEAL) = 0.0
WHERE(TAUICE(:,1) /= UNDEF) TMP(:)=TAUICE(:,1)
WHERE(TAUICE(1:NSEAL,1) /= UNDEF) TMP(1:NSEAL)=TAUICE(1:NSEAL,1)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)

CASE ('WW3_TWIY')
TMP(1:NSEAL) = 0.0
WHERE(TAUICE(:,2) /= UNDEF) TMP(:)=TAUICE(:,2)
WHERE(TAUICE(1:NSEAL,2) /= UNDEF) TMP(1:NSEAL)=TAUICE(1:NSEAL,2)
RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL))
CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION)

Expand Down
Loading

0 comments on commit e756361

Please sign in to comment.