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 12614 for NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/SWE/domain.F90 – NEMO

Ignore:
Timestamp:
2020-03-26T15:59:52+01:00 (4 years ago)
Author:
gm
Message:

first Shallow Water Eq. update

Location:
NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/SWE
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/SWE/domain.F90

    r12529 r12614  
    143143 
    144144      CALL dom_msk( ik_top, ik_bot )    ! Masks 
    145       ! 
    146       ht_0(:,:) = 0._wp  ! Reference ocean thickness 
     145 
     146      ht_0(:,:) = 0._wp                 ! Reference ocean thickness 
    147147      hu_0(:,:) = 0._wp 
    148148      hv_0(:,:) = 0._wp 
    149       DO jk = 1, jpk 
     149      hf_0(:,:) = 0._wp 
     150      DO jk = 1, jpkm1 
    150151         ht_0(:,:) = ht_0(:,:) + e3t_0(:,:,jk) * tmask(:,:,jk) 
    151152         hu_0(:,:) = hu_0(:,:) + e3u_0(:,:,jk) * umask(:,:,jk) 
    152153         hv_0(:,:) = hv_0(:,:) + e3v_0(:,:,jk) * vmask(:,:,jk) 
     154         hf_0(:,:) = hf_0(:,:) + e3f_0(:,:,jk) * ssfmask(:,:)     ! CAUTION : only valid in SWE, not with bathymetry 
    153155      END DO 
    154       ! 
     156      !                                 ! Inverse of reference ocean thickness 
     157      r1_ht_0(:,:) =  ssmask(:,:) / ( ht_0(:,:) + 1._wp -  ssmask(:,:) ) 
     158      r1_hu_0(:,:) = ssumask(:,:) / ( hu_0(:,:) + 1._wp - ssumask(:,:) ) 
     159      r1_hv_0(:,:) = ssvmask(:,:) / ( hv_0(:,:) + 1._wp - ssvmask(:,:) ) 
     160      r1_hf_0(:,:) = ssfmask(:,:) / ( hf_0(:,:) + 1._wp - ssfmask(:,:) ) 
     161       
    155162      !           !==  time varying part of coordinate system  ==! 
    156163      ! 
     
    190197      ! 
    191198      IF( ln_meshmask    )   CALL dom_wri       ! Create a domain file 
     199 
    192200      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
    193201      ! 
     
    200208         WRITE(numout,*)  
    201209      ENDIF 
     210       
    202211      ! 
    203212   END SUBROUTINE dom_init 
Note: See TracChangeset for help on using the changeset viewer.