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 8764 – NEMO

Changeset 8764


Ignore:
Timestamp:
2017-11-21T13:15:50+01:00 (6 years ago)
Author:
jcastill
Message:

Keep reading the wind stress from the atmosphere even when reading the ocean stress from waves - it is needed to calculate winds, which are used in the presence of ice

File:
1 edited

Legend:

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

    r8756 r8764  
    3030   PUBLIC sbc_flx       ! routine called by step.F90 
    3131 
    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 
     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 
    3938   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read) 
    4039   LOGICAL , PUBLIC    ::   ln_shelf_flx = .FALSE. ! UKMO SHELF specific flux flag 
     
    9392      CHARACTER(len=100) ::  cn_dir                               ! Root directory for location of flx files 
    9493      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? 
    9694      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                    ! array of namelist information structures 
    9795      TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp  ! informations about the fields to be read 
     
    9997      !!--------------------------------------------------------------------- 
    10098      ! 
    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  
    11899      IF( kt == nit000 ) THEN                ! First call kt=nit000   
    119100         ! set file information 
     
    141122         ! 
    142123         !                                         ! store namelist information in an array 
    143          IF( ln_readtau ) THEN 
    144124         slf_i(jp_utau) = sn_utau   ;   slf_i(jp_vtau) = sn_vtau 
    145          ENDIF 
    146125         slf_i(jp_qtot) = sn_qtot   ;   slf_i(jp_qsr ) = sn_qsr  
    147126         slf_i(jp_emp ) = sn_emp 
     
    167146 
    168147         !!UKMO SHELF wind speed relative to surface currents - put here to allow merging with coupling branch 
    169          IF( ln_shelf_flx .AND. ln_readtau ) THEN 
     148         IF( ln_shelf_flx ) THEN 
    170149            CALL wrk_alloc( jpi,jpj, zwnd_i, zwnd_j ) 
    171150 
     
    199178         !                                                        ! add modification due to drag coefficient read from wave forcing 
    200179         !                                                        ! this code is inefficient but put here to allow merging with another UKMO branch 
    201          IF( ln_shelf_flx .AND. ln_readtau ) THEN 
     180         IF( ln_shelf_flx ) THEN 
    202181            IF( ln_cdgw .AND. nn_drag == jp_std ) THEN 
    203182               IF( cpl_wdrag ) THEN  
     
    233212         ! 
    234213         !                                                        ! module of wind stress and wind speed at T-point 
    235          IF( ln_readtau ) THEN 
    236214         zcoef = 1. / ( zrhoa * zcdrag ) 
    237215!CDIR NOVERRCHK 
     
    255233         taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1) 
    256234         CALL lbc_lnk( taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( wndm(:,:), 'T', 1. ) 
    257          ENDIF 
    258235 
    259236         IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked) 
     
    271248         ENDIF 
    272249         ! 
    273          IF( ln_shelf_flx .AND. ln_readtau ) THEN 
     250         IF( ln_shelf_flx ) THEN 
    274251            CALL wrk_dealloc( jpi,jpj, zwnd_i, zwnd_j ) 
    275252         ENDIF 
Note: See TracChangeset for help on using the changeset viewer.