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 14072 for NEMO/trunk/src/OCE/SBC/sbcflx.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/SBC/sbcflx.F90

    r13982 r14072  
    3535   INTEGER , PARAMETER ::   jp_emp  = 5   ! index of evaporation-precipation file 
    3636 !!INTEGER , PARAMETER ::   jp_sfx  = 6   ! index of salt flux flux 
    37    INTEGER , PARAMETER ::   jpfld   = 5 !! 6 ! maximum number of files to read  
     37   INTEGER , PARAMETER ::   jpfld   = 5 !! 6 ! maximum number of files to read 
    3838   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read) 
    3939 
     
    5050      !!--------------------------------------------------------------------- 
    5151      !!                    ***  ROUTINE sbc_flx  *** 
    52       !!                    
     52      !! 
    5353      !! ** Purpose :   provide at each time step the surface ocean fluxes 
    54       !!                (momentum, heat, freshwater and runoff)  
     54      !!                (momentum, heat, freshwater and runoff) 
    5555      !! 
    5656      !! ** Method  : - READ each fluxes in NetCDF files: 
     
    9191      !!--------------------------------------------------------------------- 
    9292      ! 
    93       IF( kt == nit000 ) THEN                ! First call kt=nit000   
     93      IF( kt == nit000 ) THEN                ! First call kt=nit000 
    9494         ! set file information 
    9595         READ  ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 
     
    9898         READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 
    9999902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' ) 
    100          IF(lwm) WRITE ( numond, namsbc_flx )  
     100         IF(lwm) WRITE ( numond, namsbc_flx ) 
    101101         ! 
    102102         !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing? 
    103103         IF( ln_dm2dc .AND. sn_qsr%freqh /= 24. )   & 
    104             &   CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' )  
     104            &   CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' ) 
    105105         ! 
    106106         !                                         ! store namelist information in an array 
    107107         slf_i(jp_utau) = sn_utau   ;   slf_i(jp_vtau) = sn_vtau 
    108          slf_i(jp_qtot) = sn_qtot   ;   slf_i(jp_qsr ) = sn_qsr  
     108         slf_i(jp_qtot) = sn_qtot   ;   slf_i(jp_qsr ) = sn_qsr 
    109109         slf_i(jp_emp ) = sn_emp !! ;   slf_i(jp_sfx ) = sn_sfx 
    110110         ! 
    111111         ALLOCATE( sf(jpfld), STAT=ierror )        ! set sf structure 
    112          IF( ierror > 0 ) THEN    
    113             CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' )   ;   RETURN   
     112         IF( ierror > 0 ) THEN 
     113            CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' )   ;   RETURN 
    114114         ENDIF 
    115115         DO ji= 1, jpfld 
     
    123123 
    124124      CALL fld_read( kt, nn_fsbc, sf )                            ! input fields provided at the current time-step 
    125       
     125 
    126126      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN                        ! update ocean fluxes at each SBC frequency 
    127127 
     
    138138            qns (ji,jj) = ( sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1) ) * tmask(ji,jj,1) 
    139139            emp (ji,jj) =   sf(jp_emp )%fnow(ji,jj,1)                              * tmask(ji,jj,1) 
    140             !!sfx (ji,jj) = sf(jp_sfx )%fnow(ji,jj,1)                              * tmask(ji,jj,1)  
     140            !!sfx (ji,jj) = sf(jp_sfx )%fnow(ji,jj,1)                              * tmask(ji,jj,1) 
    141141         END_2D 
    142142         !                                                        ! add to qns the heat due to e-p 
     
    144144         !!qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp        ! mass flux is at SST 
    145145         ! 
    146          ! clem: without these lbc calls, it seems that the northfold is not ok (true in 3.6, not sure in 4.x)  
     146         ! clem: without these lbc calls, it seems that the northfold is not ok (true in 3.6, not sure in 4.x) 
    147147         CALL lbc_lnk_multi( 'sbcflx', utau, 'U', -1._wp, vtau, 'V', -1._wp, & 
    148148            &                           qns, 'T',  1._wp, emp , 'T',  1._wp, qsr, 'T', 1._wp ) !! sfx, 'T', 1._wp  ) 
    149149         ! 
    150150         IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked) 
    151             WRITE(numout,*)  
     151            WRITE(numout,*) 
    152152            WRITE(numout,*) '        read daily momentum, heat and freshwater fluxes OK' 
    153153            DO jf = 1, jpfld 
     
    155155               IF( jf == jp_qtot .OR. jf == jp_qsr  )   zfact =     0.1 
    156156               IF( jf == jp_emp                     )   zfact = 86400. 
    157                WRITE(numout,*)  
     157               WRITE(numout,*) 
    158158               WRITE(numout,*) ' day: ', ndastp , TRIM(sf(jf)%clvar), ' * ', zfact 
    159159            END DO 
     
    166166      DO_2D( 0, 0, 0, 0 ) 
    167167         ztx = ( utau(ji-1,jj  ) + utau(ji,jj) ) * 0.5_wp * ( 2._wp - MIN( umask(ji-1,jj  ,1), umask(ji,jj,1) ) ) 
    168          zty = ( vtau(ji  ,jj-1) + vtau(ji,jj) ) * 0.5_wp * ( 2._wp - MIN( vmask(ji  ,jj-1,1), vmask(ji,jj,1) ) )  
     168         zty = ( vtau(ji  ,jj-1) + vtau(ji,jj) ) * 0.5_wp * ( 2._wp - MIN( vmask(ji  ,jj-1,1), vmask(ji,jj,1) ) ) 
    169169         zmod = 0.5_wp * SQRT( ztx * ztx + zty * zty ) * tmask(ji,jj,1) 
    170170         taum(ji,jj) = zmod 
Note: See TracChangeset for help on using the changeset viewer.