Changeset 9282


Ignore:
Timestamp:
2018-01-24T17:10:24+01:00 (3 years ago)
Author:
jcastill
Message:

Implementation of the changes needed to use a mask for mixed forced/coupled river runoff independently of other coupling fields

Location:
branches/UKMO/r6232_rnf_cplmask/NEMOGCM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_rnf_cplmask/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5578 r9282  
    378378   ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models 
    379379                             !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
     380   ln_usernfmask = .false.   !  use a runoff mask file to merge data received from several models 
     381                             !   -> file rnfmask.nc with the float variable called rnfmask (jpi,jpj,nn_cplmodel) 
    380382/ 
    381383!----------------------------------------------------------------------- 
  • branches/UKMO/r6232_rnf_cplmask/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r5407 r9282  
    4646   LOGICAL , PUBLIC ::   ln_ssr         !: Sea Surface restoring on SST and/or SSS       
    4747   LOGICAL , PUBLIC ::   ln_apr_dyn     !: Atmospheric pressure forcing used on dynamics (ocean & ice) 
     48   LOGICAL, PUBLIC  ::   ln_usernfmask = .false.   !  use a runoff mask file to merge data received from several models 
     49                                                   !   -> file rnfmask.nc with the float variable called rnfmask (jpi,jpj,nn_cplmodel) 
    4850   INTEGER , PUBLIC ::   nn_ice         !: flag for ice in the surface boundary condition (=0/1/2/3) 
    4951   INTEGER , PUBLIC ::   nn_isf         !: flag for isf in the surface boundary condition (=0/1/2/3/4)  
     
    125127#endif 
    126128   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xcplmask          !: coupling mask for ln_mixcpl (warning: allocated in sbccpl) 
     129   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xrnfmask          !: coupling mask for ln_usernfmask (warning: allocated in sbcrnf) 
    127130 
    128131   !!---------------------------------------------------------------------- 
  • branches/UKMO/r6232_rnf_cplmask/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r6204 r9282  
    214214      INTEGER ::   ios  ! Local integer output status for namelist read 
    215215      INTEGER ::   inum  
     216      NAMELIST/namsbc_cpl/  ln_usernfmask       ! moved here to allow merging with other coupling branches 
    216217      REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos 
    217218      !! 
     
    271272         WRITE(numout,*)'  nn_cplmodel                         = ', nn_cplmodel 
    272273         WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask 
     274         WRITE(numout,*)'  ln_usernfmask                       = ', ln_usernfmask 
    273275      ENDIF 
    274276 
     
    403405      IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN 
    404406         srcv(jpr_rnf)%laction = .TRUE. 
    405          l_rnfcpl              = .TRUE.                      ! -> no need to read runoffs in sbcrnf 
     407         l_rnfcpl              = .NOT. ln_usernfmask         ! -> no need to read runoffs in sbcrnf 
    406408         ln_rnf                = nn_components /= jp_iam_sas ! -> force to go through sbcrnf if not sas 
    407409         IF(lwp) WRITE(numout,*) 
  • branches/UKMO/r6232_rnf_cplmask/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r6232 r9282  
    8282      ALLOCATE( rnfmsk(jpi,jpj)         , rnfmsk_z(jpk)          ,     & 
    8383         &      h_rnf (jpi,jpj)         , nk_rnf  (jpi,jpj)      ,     & 
    84          &      rnf_tsc_b(jpi,jpj,jpts) , rnf_tsc (jpi,jpj,jpts) , STAT=sbc_rnf_alloc ) 
     84         &      rnf_tsc_b(jpi,jpj,jpts) , rnf_tsc (jpi,jpj,jpts) ,     & 
     85         &      xrnfmask(jpi,jpj,1)     , STAT=sbc_rnf_alloc ) 
    8586         ! 
    8687      IF( lk_mpp            )   CALL mpp_sum ( sbc_rnf_alloc ) 
     
    128129      IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    129130         ! 
    130          IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt 
     131         IF( .NOT. l_rnfcpl )   & 
     132             rnf(:,:) = rnf(:,:) * (1. - xrnfmask(:,:,1)) + rn_rfact * sf_rnf(1)%fnow(:,:,1) * xrnfmask(:,:,1)  ! updated runoff value at time step kt 
     133 
    131134         ! 
    132135         !                                                     ! set temperature & salinity content of runoffs 
     
    442445      ENDIF 
    443446      ! 
     447      xrnfmask(:,:,:) = 1.    ! default value for points using river forcing 
     448      IF (ln_usernfmask) THEN 
     449         IF(lwp) WRITE(numout,*) 
     450         IF(lwp) WRITE(numout,*) '          runoff mask read in a file' 
     451         CALL iom_open( 'rnfmask', inum ) 
     452         CALL iom_get( inum, jpdom_data, 'rnfmask', xrnfmask(:,:,1), 1) 
     453         CALL iom_close( inum ) 
     454      ENDIF 
     455      ! 
    444456      rnf(:,:) =  0._wp                         ! runoff initialisation 
    445457      rnf_tsc(:,:,:) = 0._wp                    ! runoffs temperature & salinty contents initilisation 
Note: See TracChangeset for help on using the changeset viewer.