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 15310 for NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE – NEMO

Ignore:
Timestamp:
2021-10-01T13:36:55+02:00 (3 years ago)
Author:
hadjt
Message:

Wind velocities rather than wind stress

SBC/sbcflx.F90 edited to allow wind velocities rather than wind stresses.
namelist keyword added to namsbc_flx: sn_press, ln_shelf_flx

The version is committed in restrospect, so may not include all the changes to work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE/SBC/sbcflx.F90

    r14075 r15310  
    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 ::   jp_press = 6  ! index of pressure for UKMO shelf fluxes 
     38   INTEGER , PARAMETER ::   jpfld   = 6 !! 6 ! maximum number of files to read  
    3839 
    3940   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read) 
     41   ! JT 
     42   LOGICAL , PUBLIC    ::   ln_shelf_flx = .TRUE. ! UKMO SHELF specific flux flag 
     43   INTEGER             ::   jpfld_local   ! maximum number of files to read (locally modified depending on ln_shelf_flx)  
     44   ! JT 
     45 
    4046 
    4147   !! * Substitutions 
     
    8591      REAL(wp) ::   zcdrag = 1.5e-3       ! drag coefficient 
    8692      REAL(wp) ::   ztx, zty, zmod, zcoef ! temporary variables 
     93      ! JT 
     94      REAL     ::   cs                    ! UKMO SHELF: Friction co-efficient at surface 
     95      REAL     ::   totwindspd            ! UKMO SHELF: Magnitude of wind speed vector 
     96 
     97      REAL(wp) ::   rhoa  = 1.22         ! Air density kg/m3 
     98      REAL(wp) ::   cdrag = 1.5e-3       ! drag coefficient  
     99      ! JT 
    87100      !! 
    88101      CHARACTER(len=100) ::  cn_dir                               ! Root directory for location of flx files 
    89102      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i                    ! array of namelist information structures 
    90       TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp !!, sn_sfx ! informations about the fields to be read 
    91       NAMELIST/namsbc_flx/ cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp !!, sn_sfx 
     103      ! JT 
     104      TYPE(FLD_N) ::   sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp, sn_press !!, sn_sfx ! informations about the fields to be read 
     105      NAMELIST/namsbc_flx/ cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp,   & 
     106      &                    sn_press, ln_shelf_flx 
     107      ! JT 
     108 
    92109      !!--------------------------------------------------------------------- 
    93110      ! 
     
    102119902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' ) 
    103120         IF(lwm) WRITE ( numond, namsbc_flx )  
     121          
     122          
    104123         ! 
    105124         !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing? 
     
    112131         slf_i(jp_emp ) = sn_emp !! ;   slf_i(jp_sfx ) = sn_sfx 
    113132         ! 
    114          ALLOCATE( sf(jpfld), STAT=ierror )        ! set sf structure 
     133            ALLOCATE( sf(jpfld), STAT=ierror )        ! set sf structure 
     134            IF( ln_shelf_flx ) slf_i(jp_press) = sn_press 
     135    
     136            ! define local jpfld depending on shelf_flx logical 
     137            IF( ln_shelf_flx ) THEN 
     138               jpfld_local = jpfld 
     139            ELSE 
     140               jpfld_local = jpfld-1 
     141            ENDIF 
     142            ! 
    115143         IF( ierror > 0 ) THEN    
    116144            CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' )   ;   RETURN   
    117145         ENDIF 
    118          DO ji= 1, jpfld 
     146         DO ji= 1, jpfld_local 
    119147            ALLOCATE( sf(ji)%fnow(jpi,jpj,1) ) 
    120148            IF( slf_i(ji)%ln_tint ) ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) ) 
     
    123151         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_flx', 'flux formulation for ocean surface boundary condition', 'namsbc_flx' ) 
    124152         ! 
     153         sfx(:,:) = 0.0_wp                         ! salt flux due to freezing/melting (non-zero only if ice is present; set in limsbc(_2).F90) 
     154         ! 
    125155      ENDIF 
    126156 
     
    132162         ELSE                  ;   qsr(:,:) =          sf(jp_qsr)%fnow(:,:,1)   * tmask(:,:,1) 
    133163         ENDIF 
     164 
     165            !!UKMO SHELF effect of atmospheric pressure on SSH 
     166            ! If using ln_apr_dyn, this is done there so don't repeat here. 
     167            !IF( ln_shelf_flx .AND. .NOT. ln_apr_dyn) THEN 
     168            !   DO jj = 1, jpjm1 
     169            !      DO ji = 1, jpim1 
     170            !         apgu(ji,jj) = (-1.0/rau0)*(sf(jp_press)%fnow(ji+1,jj,1)-sf(jp_press)%fnow(ji,jj,1))/e1u(ji,jj) 
     171            !         apgv(ji,jj) = (-1.0/rau0)*(sf(jp_press)%fnow(ji,jj+1,1)-sf(jp_press)%fnow(ji,jj,1))/e2v(ji,jj) 
     172            !      END DO 
     173            !   END DO 
     174            !ENDIF  
     175 
    134176         DO jj = 1, jpj                                           ! set the ocean fluxes from read fields 
    135177            DO ji = 1, jpi 
    136                utau(ji,jj) =   sf(jp_utau)%fnow(ji,jj,1)                              * umask(ji,jj,1) 
    137                vtau(ji,jj) =   sf(jp_vtau)%fnow(ji,jj,1)                              * vmask(ji,jj,1) 
    138                qns (ji,jj) = ( sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1) ) * tmask(ji,jj,1) 
     178               !JT 
     179               IF( ln_shelf_flx ) THEN 
     180                  !! UKMO SHELF - need atmospheric pressure to calculate Haney forcing 
     181                  pressnow(ji,jj) = sf(jp_press)%fnow(ji,jj,1) 
     182                  !! UKMO SHELF flux files contain wind speed not wind stress 
     183                  totwindspd = sqrt((sf(jp_utau)%fnow(ji,jj,1))**2.0 + (sf(jp_vtau)%fnow(ji,jj,1))**2.0) 
     184                  cs = 0.63 + (0.066 * totwindspd) 
     185                  utau(ji,jj) = (cs * (rhoa/rau0) * sf(jp_utau)%fnow(ji,jj,1) * totwindspd)* umask(ji,jj,1) 
     186                  vtau(ji,jj) = (cs * (rhoa/rau0) * sf(jp_vtau)%fnow(ji,jj,1) * totwindspd)* vmask(ji,jj,1) 
     187               ELSE 
     188                  utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)* umask(ji,jj,1) 
     189                  vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)* vmask(ji,jj,1) 
     190               ENDIF 
     191               !JT                    
     192               qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj,1)                                * tmask(ji,jj,1) 
     193               !utau(ji,jj) =   sf(jp_utau)%fnow(ji,jj,1)                              * umask(ji,jj,1) 
     194               !vtau(ji,jj) =   sf(jp_vtau)%fnow(ji,jj,1)                              * vmask(ji,jj,1) 
     195               !JT qns (ji,jj) = ( sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1) ) * tmask(ji,jj,1) 
     196               qns (ji,jj) = ( sf(jp_qtot)%fnow(ji,jj,1) - qsr (ji,jj)              ) * tmask(ji,jj,1) 
    139197               emp (ji,jj) =   sf(jp_emp )%fnow(ji,jj,1)                              * tmask(ji,jj,1) 
    140198               !!sfx (ji,jj) = sf(jp_sfx )%fnow(ji,jj,1)                              * tmask(ji,jj,1)  
     
    146204         ! 
    147205         ! clem: without these lbc calls, it seems that the northfold is not ok (true in 3.6, not sure in 4.x)  
     206 
     207         !JT Enabling as used in previous version using these climate forcings 
     208         qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp        ! mass flux is at SST 
     209         !JT 
     210 
    148211         CALL lbc_lnk_multi( 'sbcflx', utau, 'U', -1._wp, vtau, 'V', -1._wp, & 
    149212            &                           qns, 'T',  1._wp, emp , 'T',  1._wp, qsr, 'T', 1._wp ) !! sfx, 'T', 1._wp  ) 
     
    152215            WRITE(numout,*)  
    153216            WRITE(numout,*) '        read daily momentum, heat and freshwater fluxes OK' 
    154             DO jf = 1, jpfld 
     217            DO jf = 1, jpfld_local 
    155218               IF( jf == jp_utau .OR. jf == jp_vtau )   zfact =     1. 
    156219               IF( jf == jp_qtot .OR. jf == jp_qsr  )   zfact =     0.1 
Note: See TracChangeset for help on using the changeset viewer.