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 7761 for trunk/NEMOGCM/NEMO/SAS_SRC – NEMO

Ignore:
Timestamp:
2017-03-06T18:58:35+01:00 (7 years ago)
Author:
clem
Message:

make AGRIF and LIM3 fully compatible

Location:
trunk/NEMOGCM/NEMO/SAS_SRC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/SAS_SRC/daymod.F90

    r7646 r7761  
    8080      IF( MOD( rday , 2.  ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
    8181      IF( MOD( rdt  , 2.  ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
    82       nsecd   = NINT(rday         ) 
    83       nsecd05 = NINT(0.5 * rday   ) 
    84       ndt     = NINT(      rdt    ) 
    85       ndt05   = NINT(0.5 * rdt    ) 
     82      nsecd   = NINT(rday       ) 
     83      nsecd05 = NINT(0.5 * rday ) 
     84      ndt     = NINT(      rdt  ) 
     85      ndt05   = NINT(0.5 * rdt  ) 
    8686 
    8787      ! ==> clem: here we read the ocean restart for the date (only if it exists) 
  • trunk/NEMOGCM/NEMO/SAS_SRC/diawri.F90

    r7646 r7761  
    4040#if defined key_lim2 
    4141   USE limwri_2  
     42#elif defined key_lim3 
     43   USE limwri 
    4244#endif 
    4345   USE lib_mpp         ! MPP library 
     
    8082   !!   Default option                                   NetCDF output file 
    8183   !!---------------------------------------------------------------------- 
    82 #if defined key_iomput 
     84# if defined key_iomput 
    8385   !!---------------------------------------------------------------------- 
    8486   !!   'key_iomput'                                        use IOM library 
     
    9597      !! ** Method  :  use iom_put 
    9698      !!---------------------------------------------------------------------- 
    97       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     99      !! 
     100      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    98101      !!---------------------------------------------------------------------- 
    99102      !  
    100       !! no relevant 2D arrays to write in iomput case 
     103      ! Output the initial state and forcings 
     104      IF( ninist == 1 ) THEN 
     105         CALL dia_wri_state( 'output.init', kt ) 
     106         ninist = 0 
     107      ENDIF 
    101108      ! 
    102109   END SUBROUTINE dia_wri 
     
    392399#if defined key_lim2 
    393400      CALL lim_wri_state_2( kt, id_i, nh_i ) 
     401#elif defined key_lim3 
     402      CALL lim_wri_state( kt, id_i, nh_i ) 
    394403#else 
    395404      CALL histend( id_i, snc4chunks=snc4set ) 
  • trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r7646 r7761  
    308308      jpim1 = jpi-1                                            ! inner domain indices 
    309309      jpjm1 = jpj-1                                            !   "           " 
    310       jpkm1 = jpk-1                                            !   "           " 
     310      jpkm1 = MAX( 1, jpk-1 )                                  !   "           " 
    311311      jpij  = jpi*jpj                                          !  jpi x j 
    312312 
     
    370370      !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules.  
    371371      !           This is not clean and should be changed in the future.  
    372                             CALL     bdy_init 
     372                            CALL bdy_init 
    373373      ! ==> 
    374374                            CALL icb_init( rdt, nit000)   ! initialise icebergs instance 
  • trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r7646 r7761  
    8888         !  
    8989         IF( ln_3d_uve ) THEN 
    90             IF( .NOT. ln_linssh )   e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity  
    91                                     ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    92                                     ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity  
     90            IF( .NOT. ln_linssh ) THEN 
     91               e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor  
     92            ELSE 
     93               e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
     94            ENDIF 
     95            ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
     96            ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity  
    9397         ELSE 
    94             IF( .NOT. ln_linssh )   e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity  
    95                                     ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    96                                     ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity  
     98            IF( .NOT. ln_linssh ) THEN 
     99               e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor  
     100            ELSE 
     101               e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
     102            ENDIF 
     103            ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
     104            ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity  
    97105         ENDIF 
    98106         ! 
     
    111119         ssv_m(:,:) = 0._wp 
    112120         ssh_m(:,:) = 0._wp 
    113          e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D 
    114          frq_m(:,:) = 1._wp        !              - - 
    115          sshn (:,:) = 0._wp        !              - - 
     121         IF( .NOT. ln_linssh ) e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D 
     122         frq_m(:,:) = 1._wp                              !              - - 
     123         sshn (:,:) = 0._wp                              !              - - 
    116124      ENDIF 
    117125       
     
    173181      NAMELIST/namsbc_sas/l_sasread, cn_dir, ln_3d_uve, ln_read_frq, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
    174182      !!---------------------------------------------------------------------- 
    175        
     183 
    176184      IF( ln_rstart .AND. nn_components == jp_iam_sas ) RETURN 
    177185       
     
    306314  
    307315      CALL sbc_ssm( nit000 )   ! need to define ss?_m arrays used in limistate 
    308       IF( .NOT. ln_read_frq )   frq_m(:,:) = 1. 
    309316      l_initdone = .TRUE. 
    310317      ! 
  • trunk/NEMOGCM/NEMO/SAS_SRC/step.F90

    r7646 r7761  
    5353 
    5454#if defined key_agrif 
    55    SUBROUTINE stp( ) 
     55   RECURSIVE SUBROUTINE stp( ) 
    5656      INTEGER             ::   kstp   ! ocean time-step index 
    5757#else 
Note: See TracChangeset for help on using the changeset viewer.