New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14953 for NEMO/branches/2021 – NEMO

Changeset 14953 for NEMO/branches/2021


Ignore:
Timestamp:
2021-06-04T17:51:36+02:00 (3 years ago)
Author:
amoulin
Message:

read wnum in sbcwave.F90 of MY_SRC -ticket #2613

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14886_VLD-03_Aimie_Moulin_Wave_Coupling_TestCase/tests/ADIAB_WAVE/MY_SRC/sbcwave.F90

    r14936 r14953  
    2424   USE bdy_oce        ! open boundary condition variables 
    2525   USE domvvl         ! domain: variable volume layers 
    26    USE zdf_oce,  ONLY : ln_zdfswm 
    2726   USE usrdef_nam , ONLY: ln_STOKES_ADIAB    
    2827   ! 
     
    325324 
    326325      ! Read also wave number if needed, so that it is available in coupling routines 
    327       IF( ln_zdfswm .OR. ln_STOKES_ADIAB .AND. .NOT. cpl_wnum ) THEN     !==wavenumber==! 
     326      IF( ln_STOKES_ADIAB .AND. .NOT. cpl_wnum ) THEN     !==wavenumber==! 
    328327         CALL fld_read( kt, nn_fsbc, sf_wn )             ! read wave parameters from external forcing 
    329328         wnum(:,:) = sf_wn(1)%fnow(:,:,1) * tmask(:,:,1) 
     
    503502         ENDIF 
    504503 
    505          IF( ln_zdfswm .OR. ln_STOKES_ADIAB ) THEN         ! Wave number (only needed for Qiao parametrisation,ln_zdfswm=T) 
    506             IF( .NOT. cpl_wnum ) THEN 
    507                ALLOCATE( sf_wn(1), STAT=ierror )           !* allocate and fill sf_wave with sn_wnum 
    508                IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_wn structure' ) 
    509                                       ALLOCATE( sf_wn(1)%fnow(jpi,jpj,1)   ) 
    510                IF( sn_wnum%ln_tint )  ALLOCATE( sf_wn(1)%fdta(jpi,jpj,1,2) ) 
    511                CALL fld_fill( sf_wn, (/ sn_wnum /), cn_dir, 'sbc_wave', 'Wave module', 'namsbc_wave' ) 
    512             ENDIF 
    513          ENDIF 
    514  
    515504         IF( ln_sdw ) THEN                      ! Stokes drift 
    516505            ! 1. Find out how many fields have to be read from file if not coupled 
     
    551540               sf_sd(jp_usd)%zsgn = -1._wp   ;  sf_sd(jp_vsd)%zsgn = -1._wp   ! vector field at T point: overwrite default definition of zsgn 
    552541            ENDIF 
     542                       ! 
     543            ! 3. Wave number (only needed for Qiao parametrisation, 
     544            ! ln_zdfqiao=T) 
     545            IF( ln_STOKES_ADIAB ) THEN 
     546             IF( .NOT. cpl_wnum ) THEN 
     547                ALLOCATE( sf_wn(1), STAT=ierror )           !* allocate and fill sf_wave with sn_wnum 
     548                IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_wn structure' ) 
     549                                       ALLOCATE( sf_wn(1)%fnow(jpi,jpj,1)   ) 
     550                IF( sn_wnum%ln_tint )  ALLOCATE( sf_wn(1)%fdta(jpi,jpj,1,2) ) 
     551                CALL fld_fill( sf_wn, (/ sn_wnum /), cn_dir, 'sbc_wave', 'Wave module', 'namsbc_wave' ) 
     552             ENDIF 
     553            ENDIF 
     554            ! 
    553555            ! 
    554556         ENDIF 
Note: See TracChangeset for help on using the changeset viewer.