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 6404 for branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

Ignore:
Timestamp:
2016-03-29T11:24:48+02:00 (8 years ago)
Author:
timgraham
Message:

First attempt at upgrading branch to the head of the trunk. This should include all of the simplification branch from the merge in Dec 2015.

Location:
branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90

    r6401 r6404  
    8383      CALL ice_run_2                   ! read in namelist some run parameters 
    8484      !           
    85       rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice time step 
     85      rdt_ice = nn_fsbc * rdt           ! sea-ice time step 
    8686      numit   = nit000 - 1 
    8787      ! 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limdmp_2.F90

    r6401 r6404  
    7171         CALL fld_read( kt, nn_fsbc, sf_icedmp ) 
    7272         ! 
    73 !CDIR COLLAPSE 
    7473         hicif(:,:) = MAX( 0._wp,                     &        ! h >= 0         avoid spurious out of physical range 
    7574            &         hicif(:,:) - rdt_ice * resto_ice(:,:,1) * ( hicif(:,:) - sf_icedmp(jp_hicif)%fnow(:,:,1) )  )  
    76 !CDIR COLLAPSE 
    7775         frld (:,:) = MAX( 0._wp, MIN( 1._wp,         &        ! 0<= frld<=1    values which blow the run up 
    7876            &         frld (:,:) - rdt_ice * resto_ice(:,:,1) * ( frld (:,:) - sf_icedmp(jp_frld )%fnow(:,:,1) )  )  ) 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limrhg_2.F90

    r6401 r6404  
    160160      !------------------------------------------------------------------- 
    161161 
    162 !CDIR NOVERRCHK 
    163162      DO jj = k_j1 , k_jpj-1 
    164 !CDIR NOVERRCHK 
    165163         DO ji = 1 , jpi 
    166164            ! only the sinus changes its sign with the hemisphere 
     
    245243         ! Computation of free drift field for free slip boundary conditions. 
    246244 
    247 !CDIR NOVERRCHK 
    248245         DO jj = k_j1, k_jpj-1 
    249 !CDIR NOVERRCHK 
    250246            DO ji = 1, fs_jpim1 
    251247               !- Rate of strain tensor. 
     
    401397iflag:   DO jter = 1 , nbitdr                                   !    Relaxation    ! 
    402398            !                                                   ! ================ ! 
    403 !CDIR NOVERRCHK 
    404399            DO jj = k_j1+1, k_jpj-1 
    405 !CDIR NOVERRCHK 
    406400               DO ji = 2, fs_jpim1   ! NO vector opt. 
    407401                  ! 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90

    r6401 r6404  
    7171               WRITE(numout,*) 
    7272               SELECT CASE ( jprstlib ) 
    73                CASE ( jprstdimg ) 
    74                   WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname 
    7573               CASE DEFAULT 
    7674                  WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname 
     
    192190      ENDIF 
    193191 
    194       IF ( jprstlib == jprstdimg ) THEN 
    195         ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
    196         ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 
    197         INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
    198         IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    199       ENDIF 
    200  
    201192      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt ) 
    202193 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r6401 r6404  
    2929   USE sbc_ice          ! surface boundary condition: ice 
    3030   USE sbc_oce          ! surface boundary condition: ocean 
    31    USE sbccpl 
     31   USE sbccpl           ! surface boundary condition: coupled interface 
    3232   USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass  
    3333   USE albedo           ! albedo parameters 
     34   ! 
    3435   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges 
    3536   USE lib_mpp          ! MPP library 
     
    4344   PRIVATE 
    4445 
    45    PUBLIC   lim_sbc_init_2     ! called by ice_init_2 
    46    PUBLIC   lim_sbc_flx_2      ! called by sbc_ice_lim_2 
    47    PUBLIC   lim_sbc_tau_2      ! called by sbc_ice_lim_2 
     46   PUBLIC   lim_sbc_init_2   ! called by ice_init_2 
     47   PUBLIC   lim_sbc_flx_2    ! called by sbc_ice_lim_2 
     48   PUBLIC   lim_sbc_tau_2    ! called by sbc_ice_lim_2 
    4849 
    4950   REAL(wp)  ::   r1_rdtice            ! = 1. / rdt_ice  
     
    5253   REAL(wp)  ::   rone   = 1._wp       !     -      - 
    5354   ! 
    54    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   soce_0, sice_0   ! constant SSS and ice salinity used in levitating sea-ice case 
     55   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   soce_0, sice_0       ! fix SSS and ice salinity used in levitating case 0 
    5556   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau_oce, vtau_oce   ! air-ocean surface i- & j-stress              [N/m2] 
    5657   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmod_io              ! modulus of the ice-ocean relative velocity   [m/s] 
     
    5859   !! * Substitutions 
    5960#  include "vectopt_loop_substitute.h90" 
    60 #  include "domzgr_substitute.h90" 
    6161   !!---------------------------------------------------------------------- 
    6262   !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) 
     
    102102      !!--------------------------------------------------------------------- 
    103103      INTEGER, INTENT(in) ::   kt    ! number of iteration 
    104       !! 
     104      ! 
    105105      INTEGER  ::   ji, jj   ! dummy loop indices 
    106106      INTEGER  ::   ii0, ii1, ij0, ij1         ! local integers 
     
    114114      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp   ! 2D/3D workspace 
    115115      !!--------------------------------------------------------------------- 
    116       
     116      ! 
    117117      CALL wrk_alloc( jpi, jpj, zqnsoce ) 
    118118      CALL wrk_alloc( jpi, jpj, 1, zalb, zalbp ) 
    119  
    120       SELECT CASE( nn_ice_embd )                 ! levitating or embedded sea-ice option 
    121         CASE( 0    )   ;   zswitch = 1           ! (0) standard levitating sea-ice : salt exchange only 
    122         CASE( 1, 2 )   ;   zswitch = 0           ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 
    123                                                  ! (2) embedded sea-ice : salt and volume fluxes and pressure 
    124       END SELECT                                 !     
     119      ! 
     120      SELECT CASE( nn_ice_embd )             ! levitating or embedded sea-ice option 
     121         CASE( 0    )   ;   zswitch = 1         ! (0) old levitating sea-ice : salt exchange only 
     122         CASE( 1, 2 )   ;   zswitch = 0         ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 
     123         !                                      ! (2) embedded sea-ice : salt and volume fluxes and pressure 
     124      END SELECT 
    125125 
    126126      !------------------------------------------! 
     
    303303      INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index 
    304304      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pu_oce, pv_oce   ! surface ocean currents 
    305       !! 
     305      ! 
    306306      INTEGER  ::   ji, jj   ! dummy loop indices 
    307307      REAL(wp) ::   zfrldu, zat_u, zu_i, zutau_ice, zu_t, zmodt   ! local scalar 
     
    319319         ! 
    320320         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step) 
    321 !CDIR NOVERRCHK 
     321            ! 
    322322            DO jj = 1, jpj                               !* modulus of ice-ocean relative velocity at I-point 
    323 !CDIR NOVERRCHK 
    324323               DO ji = 1, jpi 
    325324                  zu_i  = u_ice(ji,jj) - u_oce(ji,jj)                   ! ice-ocean relative velocity at I-point 
     
    328327               END DO 
    329328            END DO 
    330 !CDIR NOVERRCHK 
    331329            DO jj = 1, jpjm1                             !* update the modulus of stress at ocean surface (T-point) 
    332 !CDIR NOVERRCHK 
    333330               DO ji = 1, jpim1   ! NO vector opt. 
    334331                  !                                               ! modulus of U_ice-U_oce at T-point 
     
    383380         ! 
    384381         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step) 
    385 !CDIR NOVERRCHK 
     382            ! 
    386383            DO jj = 2, jpjm1                          !* modulus of the ice-ocean velocity at T-point 
    387 !CDIR NOVERRCHK 
    388384               DO ji = fs_2, fs_jpim1 
    389385                  zu_t  = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   ! 2*(U_ice-U_oce) at T-point 
     
    439435      !! ** input   : Namelist namicedia 
    440436      !!------------------------------------------------------------------- 
    441       ! 
    442       INTEGER :: jk           ! local integer 
     437      INTEGER ::   jk   ! local integer 
     438      !!------------------------------------------------------------------- 
    443439      ! 
    444440      IF(lwp) WRITE(numout,*) 
     
    474470         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    475471         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    476          do jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    477           fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    478           fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    479          end do 
    480          fse3t_a(:,:,:) = fse3t_b(:,:,:) 
    481          ! Reconstruction of all vertical scale factors at now and before time steps 
    482          ! ============================================================================= 
    483          ! Horizontal scale factor interpolations 
    484          ! -------------------------------------- 
    485          CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' ) 
    486          CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' ) 
    487          CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' ) 
    488          CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' ) 
    489          CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' ) 
    490          ! Vertical scale factor interpolations 
    491          ! ------------------------------------ 
    492          CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  ) 
    493          CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' ) 
    494          CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' ) 
    495          CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' ) 
    496          CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' ) 
    497          ! t- and w- points depth 
    498          ! ---------------------- 
    499          fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1) 
    500          fsdepw_n(:,:,1) = 0.0_wp 
    501          fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:) 
    502          DO jk = 2, jpk 
    503             fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk) 
    504             fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1) 
    505             fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:) 
    506          END DO 
     472!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently 
     473!!gm 
     474         IF( .NOT.ln_linssh ) THEN 
     475 
     476            do jk = 1,jpkm1                     ! adjust initial vertical scale factors 
     477               e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     478               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     479            end do 
     480            e3t_a(:,:,:) = e3t_b(:,:,:) 
     481            ! Reconstruction of all vertical scale factors at now and before time steps 
     482            !        ! Horizontal scale factor interpolations 
     483            CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
     484            CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
     485            CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
     486            CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
     487            CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
     488            !        ! Vertical scale factor interpolations 
     489            CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
     490            CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
     491            CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
     492            CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
     493            CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
     494            !        ! t- and w- points depth 
     495            gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
     496            gdepw_n(:,:,1) = 0.0_wp 
     497            gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
     498            DO jk = 2, jpk 
     499               gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
     500               gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
     501               gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
     502            END DO 
     503         ENDIF 
     504!!gm end 
    507505      ENDIF 
    508506      ! 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90

    r6401 r6404  
    1818   USE phycst           ! physical constants 
    1919   USE dom_oce          ! ocean space and time domain variables 
    20    USE domvvl 
    21    USE lbclnk 
     20   USE domvvl           ! ocean domain 
     21   USE ice_2            ! LIM sea-ice variables 
     22   USE sbc_oce          ! surface boundary condition: ocean 
     23   USE sbc_ice          ! surface boundary condition: sea-ice 
     24   USE thd_ice_2        ! LIM thermodynamic sea-ice variables 
     25   USE dom_ice_2        ! LIM sea-ice domain 
     26   USE limthd_zdf_2     ! 
     27   USE limthd_lac_2     ! 
     28   USE limtab_2         ! 
     29   ! 
    2230   USE in_out_manager   ! I/O manager 
    23    USE lib_mpp 
     31   USE lbclnk           ! 
     32   USE lib_mpp          ! 
    2433   USE wrk_nemo         ! work arrays 
    2534   USE iom              ! IOM library 
    26    USE ice_2            ! LIM sea-ice variables 
    27    USE sbc_oce          !  
    28    USE sbc_ice          !  
    29    USE thd_ice_2        ! LIM thermodynamic sea-ice variables 
    30    USE dom_ice_2        ! LIM sea-ice domain 
    31    USE limthd_zdf_2 
    32    USE limthd_lac_2 
    33    USE limtab_2 
    3435   USE prtctl           ! Print control 
    3536   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     
    4344   REAL(wp) ::   epsi16 = 1.e-16   ! 
    4445   REAL(wp) ::   epsi04 = 1.e-04   ! 
    45    REAL(wp) ::   rzero  = 0.e0     ! 
    46    REAL(wp) ::   rone   = 1.e0     ! 
     46   REAL(wp) ::   rzero  = 0._wp    ! 
     47   REAL(wp) ::   rone   = 1._wp    ! 
    4748 
    4849   !! * Substitutions 
    49 #  include "domzgr_substitute.h90" 
    5050#  include "vectopt_loop_substitute.h90" 
    5151   !!-------- ------------------------------------------------------------- 
     
    7575      !!--------------------------------------------------------------------- 
    7676      INTEGER, INTENT(in) ::   kt     ! number of iteration 
    77       !! 
     77      ! 
    7878      INTEGER  ::   ji, jj               ! dummy loop indices 
    7979      INTEGER  ::   nbpb                 ! nb of icy pts for thermo. cal. 
     
    196196      !-------------------------------------------------------------------------- 
    197197 
    198       !CDIR NOVERRCHK 
    199198      DO jj = 1, jpj 
    200          !CDIR NOVERRCHK 
    201199         DO ji = 1, jpi 
    202200            zthsnice       = hsnif(ji,jj) + hicif(ji,jj) 
     
    235233             
    236234            !  energy needed to bring ocean surface layer until its freezing 
    237             qcmif  (ji,jj) =  rau0 * rcp * fse3t_m(ji,jj) * ( tfu(ji,jj) - sst_m(ji,jj) - rt0 ) * ( 1 - zinda ) 
     235            qcmif  (ji,jj) =  rau0 * rcp * e3t_m(ji,jj) * ( tfu(ji,jj) - sst_m(ji,jj) - rt0 ) * ( 1 - zinda ) 
    238236             
    239237            !  calculate oceanic heat flux. 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limthd_lac_2.F90

    r6401 r6404  
    134134      !--------------------------------------------------------------------- 
    135135       
    136 !CDIR NOVERRCHK 
    137136      DO ji = kideb , kiut 
    138137         iicefr       = 1 - MAX( 0, INT( SIGN( 1.5 * zone , zfrl_old(ji) - 1.0 + epsi13 ) ) ) 
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90

    r6401 r6404  
    8585 
    8686#if ! defined key_iomput 
    87 # if defined key_dimgout 
    88    !!---------------------------------------------------------------------- 
    89    !!   'key_dimgout'                                    Direct Access file 
    90    !!---------------------------------------------------------------------- 
    91 # include "limwri_dimg_2.h90" 
    92 # else 
    9387   SUBROUTINE lim_wri_2( kt ) 
    9488      !!------------------------------------------------------------------- 
     
    215209      ! 
    216210   END SUBROUTINE lim_wri_2 
    217       
    218 #endif      
    219211 
    220212   SUBROUTINE lim_wri_init_2 
Note: See TracChangeset for help on using the changeset viewer.