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 8756 for branches/UKMO/r6232_HZG_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90 – NEMO

Ignore:
Timestamp:
2017-11-20T17:28:07+01:00 (6 years ago)
Author:
jcastill
Message:

Changes for receiving the ocean wind stress components from a wave model, both in forced and coupled mode
WARNING: this might not work properly without merging the branch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/UKMO/AMM15_v3_6_STABLE_package_UKEP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_HZG_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90

    r8503 r8756  
    3030   PUBLIC sbc_flx       ! routine called by step.F90 
    3131 
    32    INTEGER , PARAMETER ::   jpfld   = 5   ! maximum number of files to read  
    33    INTEGER , PARAMETER ::   jp_utau = 1   ! index of wind stress (i-component) file 
    34    INTEGER , PARAMETER ::   jp_vtau = 2   ! index of wind stress (j-component) file 
    35    INTEGER , PARAMETER ::   jp_qtot = 3   ! index of total (non solar+solar) heat file 
    36    INTEGER , PARAMETER ::   jp_qsr  = 4   ! index of solar heat file 
    37    INTEGER , PARAMETER ::   jp_emp  = 5   ! index of evaporation-precipation file 
     32   INTEGER             ::   jpfld   = 6   ! maximum number of files to read  
     33   INTEGER             ::   jp_utau       ! index of wind stress (i-component) file 
     34   INTEGER             ::   jp_vtau       ! index of wind stress (j-component) file 
     35   INTEGER             ::   jp_qtot       ! index of total (non solar+solar) heat file 
     36   INTEGER             ::   jp_qsr        ! index of solar heat file 
     37   INTEGER             ::   jp_emp        ! index of evaporation-precipation file 
     38   INTEGER             ::   jp_press      ! index of pressure for UKMO shelf fluxes 
    3839   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read) 
    3940   LOGICAL , PUBLIC    ::   ln_shelf_flx = .FALSE. ! UKMO SHELF specific flux flag 
     
    9293      CHARACTER(len=100) ::  cn_dir                               ! Root directory for location of flx files 
    9394      NAMELIST/namsbc_flx/ ln_shelf_flx, ln_rel_wind, rn_wfac     ! Put here to allow merging with another UKMO branch 
     95      LOGICAL  :: ln_readtau                                      ! Is it necessary to read tau from file? 
    9496      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                    ! array of namelist information structures 
    9597      TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp  ! informations about the fields to be read 
     
    9799      !!--------------------------------------------------------------------- 
    98100      ! 
     101      ln_readtau = .NOT. (ln_wave .AND. ln_tauw ) 
     102 
     103      ! prepare the index of the fields that have to be read 
     104      jpfld = 0 
     105      IF( ln_readtau ) THEN 
     106         jp_utau = jpfld+1 
     107         jp_vtau = jpfld+2 
     108         jpfld = jpfld+2 
     109      ELSE 
     110         jp_utau = 0   ;  jp_vtau = 0 
     111      ENDIF 
     112      jp_qtot = jpfld+1 
     113      jp_qsr = jpfld+2 
     114      jp_emp = jpfld+3 
     115      jp_press = jpfld+4 
     116      jpfld = jpfld+4 
     117 
    99118      IF( kt == nit000 ) THEN                ! First call kt=nit000   
    100119         ! set file information 
     
    122141         ! 
    123142         !                                         ! store namelist information in an array 
     143         IF( ln_readtau ) THEN 
    124144         slf_i(jp_utau) = sn_utau   ;   slf_i(jp_vtau) = sn_vtau 
     145         ENDIF 
    125146         slf_i(jp_qtot) = sn_qtot   ;   slf_i(jp_qsr ) = sn_qsr  
    126147         slf_i(jp_emp ) = sn_emp 
     
    146167 
    147168         !!UKMO SHELF wind speed relative to surface currents - put here to allow merging with coupling branch 
    148          IF( ln_shelf_flx ) THEN 
     169         IF( ln_shelf_flx .AND. ln_readtau ) THEN 
    149170            CALL wrk_alloc( jpi,jpj, zwnd_i, zwnd_j ) 
    150171 
     
    178199         !                                                        ! add modification due to drag coefficient read from wave forcing 
    179200         !                                                        ! this code is inefficient but put here to allow merging with another UKMO branch 
    180          IF( ln_shelf_flx ) THEN 
     201         IF( ln_shelf_flx .AND. ln_readtau ) THEN 
    181202            IF( ln_cdgw .AND. nn_drag == jp_std ) THEN 
    182203               IF( cpl_wdrag ) THEN  
     
    212233         ! 
    213234         !                                                        ! module of wind stress and wind speed at T-point 
     235         IF( ln_readtau ) THEN 
    214236         zcoef = 1. / ( zrhoa * zcdrag ) 
    215237!CDIR NOVERRCHK 
     
    233255         taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1) 
    234256         CALL lbc_lnk( taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( wndm(:,:), 'T', 1. ) 
     257         ENDIF 
    235258 
    236259         IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked) 
     
    248271         ENDIF 
    249272         ! 
    250          IF( ln_shelf_flx ) THEN 
     273         IF( ln_shelf_flx .AND. ln_readtau ) THEN 
    251274            CALL wrk_dealloc( jpi,jpj, zwnd_i, zwnd_j ) 
    252275         ENDIF 
Note: See TracChangeset for help on using the changeset viewer.