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 8981 for branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2017-12-11T18:38:08+01:00 (7 years ago)
Author:
deazer
Message:

Deal with rn_ssh_ref, this is not a namelist variable but read in from cfg file
change to ssh_ref, set to zero if no cfg file such as test cases
ht_wd_0 looks is obsolete.

Location:
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90

    r8956 r8981  
    171171         ij = idx%nbj(jb,igrd) 
    172172         IF( ll_wd ) THEN 
    173             spgu(ii, ij) = dta%ssh(jb)  - rn_ssh_ref  
     173            spgu(ii, ij) = dta%ssh(jb)  - ssh_ref  
    174174         ELSE 
    175175            spgu(ii, ij) = dta%ssh(jb) 
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r8956 r8981  
    155155 
    156156      IF( ll_wd ) THEN 
    157          CALL iom_put( "ssh" , sshn+rn_ssh_ref )   ! sea surface height (brought back to the reference used for wetting and drying) 
     157         CALL iom_put( "ssh" , (sshn+ssh_ref)*tmask(:,:,1) )   ! sea surface height (brought back to the reference used for wetting and drying) 
    158158      ELSE 
    159159         CALL iom_put( "ssh" , sshn )              ! sea surface height 
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r8956 r8981  
    888888               ELSE 
    889889                  ! if not test case 
    890                   sshn(:,:) = -rn_ssh_ref 
    891                   sshb(:,:) = -rn_ssh_ref 
     890                  sshn(:,:) = -ssh_ref 
     891                  sshb(:,:) = -ssh_ref 
    892892 
    893893                  DO jj = 1, jpj 
    894894                     DO ji = 1, jpi 
    895                         IF( ht_0(ji,jj)-rn_ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth 
     895                        IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth 
    896896 
    897897                           sshb(ji,jj) = rn_wdmin1 - (ht_0(ji,jj) ) 
     
    905905               ! Adjust vertical metrics for all wad 
    906906               DO jk = 1, jpk 
    907                   e3t_n(:,:,jk) =  e3t_0(:,:,jk) * ( ht_0(:,:) - rn_ht_0 + sshn(:,:)  ) & 
     907                  e3t_n(:,:,jk) =  e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:)  ) & 
    908908                    &                            / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk)   & 
    909909                    &            + e3t_0(:,:,jk) * ( 1._wp - tmask(:,:,jk) ) 
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r8956 r8981  
    3030   USE usrdef_zgr     ! user defined vertical coordinate system 
    3131   USE depth_e3       ! depth <=> e3 
    32    USE wet_dry,   ONLY: ll_wd, rn_ssh_ref  ! Wetting and drying 
     32   USE wet_dry,   ONLY: ll_wd, ssh_ref  ! Wetting and drying 
    3333   ! 
    3434   USE in_out_manager ! I/O manager 
     
    259259      ! 
    260260      ! reference depth for negative bathy (wetting and drying only) 
    261       IF( ll_wd )  CALL iom_get( inum,  'rn_wd_ref_depth' , rn_ssh_ref   ) 
     261      IF( ll_wd )  CALL iom_get( inum,  'rn_wd_ref_depth' , ssh_ref   ) 
    262262      ! 
    263263      CALL iom_close( inum ) 
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DYN/wet_dry.F90

    r8977 r8981  
    4848                                      !: where the flow is from wet points on less than half the barotropic sub-steps   
    4949   LOGICAL,  PUBLIC  ::  ln_wd_dl_rmp !: use a ramp for the dl flux limiter between 2 rn_wdmin1 and rn_wdmin1 (rather than a cut-off at rn_wdmin1)       
    50    REAL(wp), PUBLIC  ::   rn_ssh_ref  !: height of z=0 with respect to the geoid;  
    51    REAL(wp), PUBLIC  ::   rn_ht_0     !: the height at which ht_0 = 0    
     50   REAL(wp), PUBLIC  ::   ssh_ref     !: height of z=0 with respect to the geoid;  
    5251 
    5352   LOGICAL,  PUBLIC  ::   ll_wd       !: Wetting/drying activation switch if either ln_wd_il or ln_wd_dl 
     
    7069      !!---------------------------------------------------------------------- 
    7170      NAMELIST/namwad/ ln_wd_il, ln_wd_dl, rn_wdmin0, rn_wdmin1, rn_wdmin2, rn_wdld, & 
    72                      & nn_wdit, ln_wd_dl_bc, ln_wd_dl_rmp, rn_ht_0 
     71                     & nn_wdit, ln_wd_dl_bc, ln_wd_dl_rmp 
    7372 
    7473      INTEGER  ::   ios                 ! Local integer output status for namelist read 
     
    10099         WRITE(numout,*) '      T => baroclinic u,v=0 at dry pts: ln_wd_dl_bc = ', ln_wd_dl_bc      
    101100         WRITE(numout,*) '      use a ramp for rwd limiter:  ln_wd_dl_rwd_rmp = ', ln_wd_dl_rmp 
    102          WRITE(numout,*) '      the height (z) at which ht_0=0:  rn_ht_0      = ', rn_ht_0   
     101  
    103102      ENDIF 
     103      IF( .NOT. ln_read_cfg ) THEN 
     104         WRITE(numout,*) '      No configuration file so seting ssh_ref to zero  ' 
     105          ssh_ref=0.0 
     106      ENDIF 
     107 
    104108      r_rn_wdmin1=1/rn_wdmin1 
    105109      ll_wd = .FALSE. 
     
    178182 
    179183            IF( tmask(ji, jj, 1) < 0.5_wp ) CYCLE              ! we don't care about land cells 
    180             IF( ht_0(ji,jj) - rn_ssh_ref > zdepwd ) CYCLE   ! and cells which are unlikely to dry 
     184            IF( ht_0(ji,jj) - ssh_ref > zdepwd ) CYCLE   ! and cells which are unlikely to dry 
    181185 
    182186            zflxp(ji,jj) = max(zflxu(ji,jj), 0._wp) - min(zflxu(ji-1,jj),   0._wp) + & 
  • branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/stpctl.F90

    r8977 r8981  
    2222   USE lib_mpp         ! distributed memory computing 
    2323   USE lib_fortran     ! Fortran routines library  
    24    USE wet_dry,    ONLY: ll_wd, rn_ssh_ref    ! reference depth for negative bathy 
     24   USE wet_dry,    ONLY: ll_wd, ssh_ref    ! reference depth for negative bathy 
    2525 
    2626   IMPLICIT NONE 
     
    152152         DO ji = 1, jpi 
    153153            IF( ll_wd ) THEN 
    154                IF( tmask(ji,jj,1) == 1) zsshmax = MAX( zsshmax, ABS(sshn(ji,jj)+rn_ssh_ref) ) 
     154               IF( tmask(ji,jj,1) == 1) zsshmax = MAX( zsshmax, ABS(sshn(ji,jj)+ssh_ref) ) 
    155155            ELSE 
    156156               IF( tmask(ji,jj,1) == 1) zsshmax = MAX( zsshmax, ABS(sshn(ji,jj)) ) 
Note: See TracChangeset for help on using the changeset viewer.