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 5851 for branches – NEMO

Changeset 5851 for branches


Ignore:
Timestamp:
2015-11-02T12:37:47+01:00 (8 years ago)
Author:
jcastill
Message:

Merge with mslp branch to allow merge without conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_ww3_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5849 r5851  
    105105   INTEGER, PARAMETER ::   jpr_e3t1st = 41            ! first T level thickness  
    106106   INTEGER, PARAMETER ::   jpr_fraqsr = 42            ! fraction of solar net radiation absorbed in the first ocean level 
    107 #if defined key_ww3 
    108    INTEGER, PARAMETER ::   jpr_hsig   = 43            ! Hsig 
    109    INTEGER, PARAMETER ::   jpr_phioc  = 44            ! Wave=>ocean energy flux 
    110    INTEGER, PARAMETER ::   jprcv      = 44            ! total number of fields received  
    111 #else 
    112    INTEGER, PARAMETER ::   jprcv      = 42            ! total number of fields received  
    113 #endif 
     107   INTEGER, PARAMETER ::   jpr_mslp   = 43            ! mean sea level pressure 
     108   INTEGER, PARAMETER ::   jpr_hsig   = 44            ! Hsig 
     109   INTEGER, PARAMETER ::   jpr_phioc  = 45            ! Wave=>ocean energy flux 
     110   INTEGER, PARAMETER ::   jprcv      = 45            ! total number of fields received  
    114111 
    115112   INTEGER, PARAMETER ::   jps_fice   =  1            ! ice fraction sent to the atmosphere 
     
    141138   INTEGER, PARAMETER ::   jps_e3t1st = 27            ! first level depth (vvl) 
    142139   INTEGER, PARAMETER ::   jps_fraqsr = 28            ! fraction of solar net radiation absorbed in the first ocean level 
    143 #if defined key_ww3 
    144140   INTEGER, PARAMETER ::   jps_ficet  = 29            ! total ice fraction  
    145141   INTEGER, PARAMETER ::   jps_ocxw   = 30            ! currents on grid 1  
    146142   INTEGER, PARAMETER ::   jps_ocyw   = 31            ! currents on grid 1  
    147143   INTEGER, PARAMETER ::   jpsnd      = 31            ! total number of fields sended 
    148 #else 
    149    INTEGER, PARAMETER ::   jpsnd      = 28            ! total number of fields sended 
    150 #endif 
    151144 
    152145   !                                                         !!** namelist namsbc_cpl ** 
     
    162155   ! Received from the atmosphere                     ! 
    163156   TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf 
    164    TYPE(FLD_C) ::   sn_rcv_cal, sn_rcv_iceflx, sn_rcv_co2                         
     157   TYPE(FLD_C) ::   sn_rcv_cal, sn_rcv_iceflx, sn_rcv_co2, sn_rcv_mslp                           
    165158   ! Send to waves 
    166159   TYPE(FLD_C) ::   sn_snd_ifrac, sn_snd_crtw 
     
    179172   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   albedo_oce_mix     ! ocean albedo sent to atmosphere (mix clear/overcast sky) 
    180173 
     174   REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure[N/m2] 
     175   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0) 
     176 
    181177   INTEGER , ALLOCATABLE, SAVE, DIMENSION(    :) ::   nrcvinfo           ! OASIS info argument 
    182178 
     
    196192      !!             ***  FUNCTION sbc_cpl_alloc  *** 
    197193      !!---------------------------------------------------------------------- 
    198       INTEGER :: ierr(3) 
     194      INTEGER :: ierr(4) 
    199195      !!---------------------------------------------------------------------- 
    200196      ierr(:) = 0 
     
    207203      ALLOCATE( xcplmask(jpi,jpj,0:nn_cplmodel) , STAT=ierr(3) ) 
    208204      ! 
     205      IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(4) ) 
     206 
    209207      sbc_cpl_alloc = MAXVAL( ierr ) 
    210208      IF( lk_mpp            )   CALL mpp_sum ( sbc_cpl_alloc ) 
     
    233231      REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos 
    234232      !! 
    235       NAMELIST/namsbc_cpl/  sn_snd_temp , sn_snd_alb  , sn_snd_thick, sn_snd_crt   , sn_snd_co2,      & 
    236          &                  sn_snd_ifrac, sn_snd_crtw ,                                               & 
    237          &                  sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau  , sn_rcv_dqnsdt, sn_rcv_qsr,      & 
    238          &                  sn_rcv_hsig, sn_rcv_phioc ,                                               & 
    239          &                  sn_rcv_qns , sn_rcv_emp   , sn_rcv_rnf  , sn_rcv_cal   , sn_rcv_iceflx,   & 
    240          &                  sn_rcv_co2 , nn_cplmodel  , ln_usecplmask 
     233      NAMELIST/namsbc_cpl/  sn_snd_temp , sn_snd_alb  , sn_snd_thick , sn_snd_crt   , sn_snd_co2,      & 
     234         &                  sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau   , sn_rcv_dqnsdt, sn_rcv_qsr,      & 
     235         &                  sn_snd_ifrac, sn_snd_crtw , sn_rcv_hsig  , sn_rcv_phioc ,                  & 
     236         &                  sn_rcv_qns , sn_rcv_emp   , sn_rcv_rnf   , sn_rcv_cal   , sn_rcv_iceflx,   & 
     237         &                  sn_rcv_co2 , nn_cplmodel  , ln_usecplmask, sn_rcv_mslp 
    241238      !!--------------------------------------------------------------------- 
    242239      ! 
     
    291288         WRITE(numout,*)'                      - mesh          = ', sn_snd_crt%clvgrd 
    292289         WRITE(numout,*)'      oce co2 flux                    = ', TRIM(sn_snd_co2%cldes   ), ' (', TRIM(sn_snd_co2%clcat   ), ')' 
     290         WRITE(numout,*)'      mean sea level pressure         = ', TRIM(sn_rcv_mslp%cldes  ), ' (', TRIM(sn_rcv_mslp%clcat  ), ')' 
    293291         WRITE(numout,*)'      surface current to waves        = ', TRIM(sn_snd_crtw%cldes   ), ' (', TRIM(sn_snd_crtw%clcat   ), ')' 
    294292         WRITE(numout,*)'                      - referential   = ', sn_snd_crtw%clvref 
     
    496494      !                                                      ! ------------------------- ! 
    497495      srcv(jpr_co2 )%clname = 'O_AtmCO2'   ;   IF( TRIM(sn_rcv_co2%cldes   ) == 'coupled' )    srcv(jpr_co2 )%laction = .TRUE. 
     496 
     497      !                                                      ! ------------------------- ! 
     498      !                                                      ! Mean Sea Level Pressure   ! 
     499      !                                                      ! ------------------------- ! 
     500      srcv(jpr_mslp)%clname = 'O_MSLP'     ;   IF( TRIM(sn_rcv_mslp%cldes  ) == 'coupled' )    srcv(jpr_mslp)%laction = .TRUE. 
     501 
    498502      !                                                      ! ------------------------- ! 
    499503      !                                                      !   topmelt and botmelt     !    
     
    11631167      ! 
    11641168      CALL wrk_dealloc( jpi,jpj, ztx, zty, zmsk, zemp, zqns, zqsr ) 
     1169      ! 
     1170      !                                                      ! ========================= ! 
     1171      !                                                      ! Mean Sea Level Pressure   !   (taum) 
     1172      !                                                      ! ========================= ! 
     1173      ! 
     1174      IF( srcv(jpr_mslp)%laction ) THEN                    ! UKMO SHELF effect of atmospheric pressure on SSH 
     1175         IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields 
     1176 
     1177         r1_grau = 1.e0 / (grav * rau0)               !* constant for optimization 
     1178         ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rpref ) * r1_grau    ! equivalent ssh (inverse barometer) 
     1179         apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1)                        !atmospheric pressure 
     1180 
     1181         IF( kt == nit000 ) ssh_ibb(:,:) = ssh_ib(:,:)  ! correct this later (read from restart if possible) 
     1182      END IF 
     1183 
    11651184      ! 
    11661185      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_rcv') 
Note: See TracChangeset for help on using the changeset viewer.