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 13998 for NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/tests/ISOMIP+/MY_SRC/istate.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T14:55:21+01:00 (3 years ago)
Author:
techene
Message:

branch updated with trunk 13787

Location:
NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@13292        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/tests/ISOMIP+/MY_SRC/istate.F90

    r13874 r13998  
    2424   USE dom_oce        ! ocean space and time domain  
    2525   USE daymod         ! calendar 
    26    USE divhor         ! horizontal divergence            (div_hor routine) 
    2726   USE dtatsd         ! data temperature and salinity   (dta_tsd routine) 
    2827   USE dtauvd         ! data: U & V current             (dta_uvd routine) 
     
    3534   USE lib_mpp         ! MPP library 
    3635   USE restart         ! restart 
     36#if defined key_agrif 
     37   USE agrif_oce_interp 
     38   USE agrif_oce 
     39#endif    
    3740 
    3841   IMPLICIT NONE 
     
    4346   !! * Substitutions 
    4447#  include "do_loop_substitute.h90" 
     48#  include "domzgr_substitute.h90" 
    4549   !!---------------------------------------------------------------------- 
    4650   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    5963      ! 
    6064      INTEGER ::   ji, jj, jk   ! dummy loop indices 
     65      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table  !!st patch to use gdept subtitute 
    6166!!gm see comment further down 
    6267      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zuvd    ! U & V data workspace 
     
    7075!!gm  Why not include in the first call of dta_tsd ?   
    7176!!gm  probably associated with the use of internal damping... 
    72                      CALL dta_tsd_init        ! Initialisation of T & S input data 
     77       CALL dta_tsd_init        ! Initialisation of T & S input data 
    7378!!gm to be moved in usrdef of C1D case 
    7479!      IF( lk_c1d )   CALL dta_uvd_init        ! Initialization of U & V input data 
     
    8489#endif 
    8590 
     91#if defined key_agrif 
     92      IF ( (.NOT.Agrif_root()).AND.ln_init_chfrpar ) THEN 
     93         numror = 0                           ! define numror = 0 -> no restart file to read 
     94         ln_1st_euler = .true.                ! Set time-step indicator at nit000 (euler forward) 
     95         CALL day_init  
     96         CALL agrif_istate( Kbb, Kmm, Kaa )   ! Interp from parent 
     97         ! 
     98         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)  
     99         ssh (:,:,Kmm)     = ssh(:,:,Kbb) 
     100         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
     101         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     102      ELSE 
     103#endif 
    86104      IF( ln_rstart ) THEN                    ! Restart from a file 
    87105         !                                    ! ------------------- 
     
    99117            CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
    100118            ! 
    101 !!st            ssh(:,:,Kbb)   = 0._wp               ! set the ocean at rest 
    102 !!st            IF( ll_wd ) THEN 
    103 !!st               ssh(:,:,Kbb) =  -ssh_ref  ! Added in 30 here for bathy that adds 30 as Iterative test CEOD  
    104 !!st               ! 
    105 !!st               ! Apply minimum wetdepth criterion 
    106 !!st               ! 
    107 !!st               DO_2D( 1, 1, 1, 1 ) 
    108 !!st                  IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN 
    109 !!st                     ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) ) 
    110 !!st                  ENDIF 
    111 !!st               END_2D 
    112 !!st            ENDIF  
    113             uu  (:,:,:,Kbb) = 0._wp 
    114             vv  (:,:,:,Kbb) = 0._wp   
     119            uu (:,:,:,Kbb) = 0._wp 
     120            vv (:,:,:,Kbb) = 0._wp 
    115121            ! 
    116122         ELSE                                 ! user defined initial T and S 
    117             CALL usr_def_istate( gdept(:,:,:,Kbb), tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) ) 
    118             CALL usr_def_istate_ssh(tmask, ssh(:,:,Kbb) )          
     123            DO jk = 1, jpk 
     124               zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
     125            END DO 
     126            CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb)  )          
    119127         ENDIF 
    120128         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
    121 !!st         ssh (:,:,Kmm)     = ssh(:,:,Kbb)    
    122129         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    123130         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
    124          hdiv(:,:,jpk) = 0._wp               ! bottom divergence set one for 0 to zero at jpk level 
    125          CALL div_hor( 0, Kbb, Kmm )         ! compute interior hdiv value   
    126 !!gm                                    hdiv(:,:,:) = 0._wp 
    127131 
    128132!!gm POTENTIAL BUG : 
    129133!!gm  ISSUE :  if ssh(:,:,Kbb) /= 0  then, in non linear free surface, the e3._n, e3._b should be recomputed 
    130 !!             as well as gdept and gdepw....   !!!!!  
     134!!             as well as gdept_ and gdepw_....   !!!!!  
    131135!!      ===>>>>   probably a call to domvvl initialisation here.... 
    132136 
     
    152156         !  
    153157      ENDIF  
     158#if defined key_agrif 
     159      ENDIF 
     160#endif 
    154161      !  
    155162      ! Initialize "now" and "before" barotropic velocities: 
Note: See TracChangeset for help on using the changeset viewer.