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 3795 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

Ignore:
Timestamp:
2013-02-11T10:29:31+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_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90

    r3680 r3795  
    2626   PUBLIC   sbc_apr    ! routine called in sbcmod 
    2727    
    28    !                                         !!* namsbc_apr namelist (Atmospheric PRessure) * 
    29    LOGICAL, PUBLIC ::   ln_apr_obc = .FALSE.  !: inverse barometer added to OBC ssh data  
    30    LOGICAL, PUBLIC ::   ln_ref_apr = .FALSE.  !: ref. pressure: global mean Patm (F) or a constant (F) 
     28   !                                              !!* namsbc_apr namelist (Atmospheric PRessure) * 
     29   LOGICAL, PUBLIC ::   ln_apr_obc = .FALSE.      !: inverse barometer added to OBC ssh data  
     30   LOGICAL, PUBLIC ::   ln_ref_apr = .FALSE.      !: ref. pressure: global mean Patm (F) or a constant (F) 
     31   REAL(wp)        ::   rn_pref    = 101000._wp   !  reference atmospheric pressure   [N/m2] 
    3132 
    3233   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   ssh_ib    ! Inverse barometer now    sea surface height   [m] 
     
    3435   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   apr       ! atmospheric pressure at kt                 [N/m2] 
    3536    
    36    REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure          [N/m2] 
    3737   REAL(wp) ::   tarea                ! whole domain mean masked ocean surface 
    3838   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0) 
     
    6969      TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read 
    7070      !! 
    71       NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rpref, ln_apr_obc 
     71      NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 
    7272      !!---------------------------------------------------------------------- 
    7373      ! 
     
    102102         ! 
    103103         IF( ln_ref_apr ) THEN                        !* Compute whole inner domain mean masked ocean surface 
    104             tarea = glob_sum( e1t(:,:) * e2t(:,:) ) 
     104            tarea = glob_sum( e1e2t(:,:) ) 
    105105            IF(lwp) WRITE(numout,*) '         Variable ref. Patm computed over a ocean surface of ', tarea*1e-6, 'km2' 
    106106         ELSE 
    107             IF(lwp) WRITE(numout,*) '         Reference Patm used : ', rpref, ' N/m2' 
     107            IF(lwp) WRITE(numout,*) '         Reference Patm used : ', rn_pref, ' N/m2' 
    108108         ENDIF 
    109109         ! 
     
    129129         ! 
    130130         !                                                  !* update the reference atmospheric pressure (if necessary) 
    131          IF( ln_ref_apr )   rpref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1t(:,:) * e2t(:,:) ) / tarea 
     131         IF( ln_ref_apr )   rn_pref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea 
    132132         ! 
    133133         !                                                  !* Patm related forcing at kt 
    134          ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rpref ) * r1_grau    ! equivalent ssh (inverse barometer) 
     134         ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer) 
    135135         apr   (:,:) =     sf_apr(1)%fnow(:,:,1)                        ! atmospheric pressure 
    136136         ! 
Note: See TracChangeset for help on using the changeset viewer.