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 3797 for branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2013-02-11T12:26:15+01:00 (11 years ago)
Author:
cbricaud
Message:

replace rpref by rn_pref and e1t(:,:) * e2t(:,:) by e1e2t in sbcapr and put ln_apr_obc in namelist in CONFIG; see ticket 905

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90

    r3294 r3797  
    1515   USE dynspg_oce      ! surface pressure gradient variables 
    1616   USE phycst          ! physical constants 
     17   USE restart          ! ocean restart 
    1718   USE fldread         ! read input fields 
    1819   USE in_out_manager  ! I/O manager 
     
    2021   USE iom             ! IOM library 
    2122   USE lib_mpp         ! MPP library 
    22    USE restart         ! ocean restart 
    2323 
    2424   IMPLICIT NONE 
     
    2727   PUBLIC   sbc_apr    ! routine called in sbcmod 
    2828    
    29    !                                         !!* namsbc_apr namelist (Atmospheric PRessure) * 
    30    LOGICAL, PUBLIC ::   ln_apr_obc = .FALSE.  !: inverse barometer added to OBC ssh data  
    31    LOGICAL, PUBLIC ::   ln_ref_apr = .FALSE.  !: ref. pressure: global mean Patm (F) or a constant (F) 
     29   !                                              !!* namsbc_apr namelist (Atmospheric PRessure) * 
     30   LOGICAL, PUBLIC ::   ln_apr_obc = .FALSE.      !: inverse barometer added to OBC ssh data  
     31   LOGICAL, PUBLIC ::   ln_ref_apr = .FALSE.      !: ref. pressure: global mean Patm (F) or a constant (F) 
     32   REAL(wp)        ::   rn_pref    = 101000._wp   !  reference atmospheric pressure   [N/m2] 
    3233 
    3334   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   ssh_ib    ! Inverse barometer now    sea surface height   [m] 
     
    3536   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   apr       ! atmospheric pressure at kt                 [N/m2] 
    3637    
    37    REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure          [N/m2] 
    3838   REAL(wp) ::   tarea                ! whole domain mean masked ocean surface 
    3939   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0) 
     
    6666      !! 
    6767      INTEGER            ::   ierror  ! local integer  
    68       REAL(wp)           ::   zpref   ! local scalar 
    6968      !! 
    7069      CHARACTER(len=100) ::  cn_dir   ! Root directory for location of ssr files 
    7170      TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read 
    7271      !! 
    73       NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr 
     72      NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 
    7473      !!---------------------------------------------------------------------- 
    7574      ! 
     
    104103         ! 
    105104         IF( ln_ref_apr ) THEN                        !* Compute whole inner domain mean masked ocean surface 
    106             tarea = glob_sum( e1t(:,:) * e2t(:,:) ) 
     105            tarea = glob_sum( e1e2t(:,:) ) 
    107106            IF(lwp) WRITE(numout,*) '         Variable ref. Patm computed over a ocean surface of ', tarea*1e-6, 'km2' 
    108107         ELSE 
    109             IF(lwp) WRITE(numout,*) '         Reference Patm used : ', rpref, ' N/m2' 
     108            IF(lwp) WRITE(numout,*) '         Reference Patm used : ', rn_pref, ' N/m2' 
    110109         ENDIF 
    111110         ! 
     
    113112         ! 
    114113         !                                            !* control check 
    115          IF( ln_apr_obc  )   & 
    116             CALL ctl_stop( 'sbc_apr: inverse barometer added to OBC ssh data not yet implemented ' ) 
    117          IF( ln_apr_obc .AND. .NOT. lk_obc )   & 
    118             CALL ctl_stop( 'sbc_apr: add inverse barometer to OBC requires to use key_obc' ) 
     114         IF ( ln_apr_obc  ) THEN 
     115            IF(lwp) WRITE(numout,*) '         Inverse barometer added to OBC ssh data' 
     116         ENDIF 
    119117         IF( ( ln_apr_obc ) .AND. .NOT. lk_dynspg_ts )   & 
    120118            CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY possible with time-splitting' ) 
     
    132130         ! 
    133131         !                                                  !* update the reference atmospheric pressure (if necessary) 
    134          IF( ln_ref_apr )   rpref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1t(:,:) * e2t(:,:) ) / tarea 
     132         IF( ln_ref_apr )   rn_pref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea 
    135133         ! 
    136134         !                                                  !* Patm related forcing at kt 
    137          ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rpref ) * r1_grau    ! equivalent ssh (inverse barometer) 
     135         ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer) 
    138136         apr   (:,:) =     sf_apr(1)%fnow(:,:,1)                        ! atmospheric pressure 
    139137         ! 
Note: See TracChangeset for help on using the changeset viewer.