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 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DOM/istate.F90 – NEMO

Ignore:
Timestamp:
2021-05-05T13:18:04+02:00 (3 years ago)
Author:
mcastril
Message:

[2021/HPC-11_mcastril_HPDAonline_DiagGPU] Update externals

Location:
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
         5^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8^/vendors/PPR@HEAD            ext/PPR 
        89 
        910# SETTE 
        10 ^/utils/CI/sette@13559        sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DOM/istate.F90

    r13295 r14789  
    3434   USE lib_mpp         ! MPP library 
    3535   USE restart         ! restart 
     36 
    3637#if defined key_agrif 
     38   USE agrif_oce       ! initial state interpolation 
    3739   USE agrif_oce_interp 
    38    USE agrif_oce 
    3940#endif    
    4041 
     
    4243   PRIVATE 
    4344 
    44    PUBLIC   istate_init   ! routine called by step.F90 
     45   PUBLIC   istate_init   ! routine called by nemogcm.F90 
    4546 
    4647   !! * Substitutions 
     
    5960      !!  
    6061      !! ** Purpose :   Initialization of the dynamics and tracer fields. 
     62      !! 
     63      !! ** Method  :    
    6164      !!---------------------------------------------------------------------- 
    6265      INTEGER, INTENT( in )  ::  Kbb, Kmm, Kaa   ! ocean time level indices 
    6366      ! 
    6467      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    65       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table  !!st patch to use gdept subtitute 
     68      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zgdept     ! 3D table for qco substitute 
    6669!!gm see comment further down 
    6770      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zuvd    ! U & V data workspace 
     
    7376      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    7477 
    75 !!gm  Why not include in the first call of dta_tsd ?   
    76 !!gm  probably associated with the use of internal damping... 
    7778       CALL dta_tsd_init        ! Initialisation of T & S input data 
    78 !!gm to be moved in usrdef of C1D case 
     79 
    7980!      IF( lk_c1d )   CALL dta_uvd_init        ! Initialization of U & V input data 
    80 !!gm 
    8181 
    82       rhd  (:,:,:  ) = 0._wp   ;   rhop (:,:,:  ) = 0._wp      ! set one for all to 0 at level jpk 
    83       rn2b (:,:,:  ) = 0._wp   ;   rn2  (:,:,:  ) = 0._wp      ! set one for all to 0 at levels 1 and jpk 
    84       ts  (:,:,:,:,Kaa) = 0._wp                                   ! set one for all to 0 at level jpk 
    85       rab_b(:,:,:,:) = 0._wp   ;   rab_n(:,:,:,:) = 0._wp      ! set one for all to 0 at level jpk 
     82      rhd  (:,:,:      ) = 0._wp   ;   rhop (:,:,:  ) = 0._wp      ! set one for all to 0 at level jpk 
     83      rn2b (:,:,:      ) = 0._wp   ;   rn2  (:,:,:  ) = 0._wp      ! set one for all to 0 at levels 1 and jpk 
     84      ts   (:,:,:,:,Kaa) = 0._wp                                   ! set one for all to 0 at level jpk 
     85      rab_b(:,:,:,:    ) = 0._wp   ;   rab_n(:,:,:,:) = 0._wp      ! set one for all to 0 at level jpk 
    8686#if defined key_agrif 
    8787      uu   (:,:,:  ,Kaa) = 0._wp   ! used in agrif_oce_sponge at initialization 
     
    9090 
    9191#if defined key_agrif 
    92       IF ( (.NOT.Agrif_root()).AND.ln_init_chfrpar ) THEN 
     92      IF ( .NOT.Agrif_root() .AND. ln_init_chfrpar ) THEN 
    9393         numror = 0                           ! define numror = 0 -> no restart file to read 
    9494         ln_1st_euler = .true.                ! Set time-step indicator at nit000 (euler forward) 
    9595         CALL day_init  
    96          CALL agrif_istate( Kbb, Kmm, Kaa )   ! Interp from parent 
     96         CALL agrif_istate_oce( Kbb, Kmm, Kaa )   ! Interp from parent 
    9797         ! 
    98          ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)  
    99          ssh (:,:,Kmm)     = ssh(:,:,Kbb) 
    100          uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    101          vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     98         ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) 
     99         uu (:,:,:  ,Kmm) = uu (:,:,:  ,Kbb) 
     100         vv (:,:,:  ,Kmm) = vv (:,:,:  ,Kbb) 
    102101      ELSE 
    103102#endif 
    104       IF( ln_rstart ) THEN                    ! Restart from a file 
    105          !                                    ! ------------------- 
    106          CALL rst_read( Kbb, Kmm )            ! Read the restart file 
    107          CALL day_init                        ! model calendar (using both namelist and restart infos) 
    108          ! 
    109       ELSE                                    ! Start from rest 
    110          !                                    ! --------------- 
    111          numror = 0                           ! define numror = 0 -> no restart file to read 
    112          l_1st_euler = .true.                 ! Set time-step indicator at nit000 (euler forward) 
    113          CALL day_init                        ! model calendar (using both namelist and restart infos) 
    114          !                                    ! Initialization of ocean to zero 
    115          ! 
    116          IF( ln_tsd_init ) THEN                
    117             CALL dta_tsd( nit000, ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
     103         IF( ln_rstart ) THEN                    ! Restart from a file 
     104            !                                    ! ------------------- 
     105            CALL rst_read( Kbb, Kmm )            ! Read the restart file 
     106            CALL day_init                        ! model calendar (using both namelist and restart infos) 
    118107            ! 
    119             ssh(:,:,Kbb)   = 0._wp               ! set the ocean at rest 
    120             uu  (:,:,:,Kbb) = 0._wp 
    121             vv  (:,:,:,Kbb) = 0._wp   
     108         ELSE                                    ! Start from rest 
     109            !                                    ! --------------- 
     110            numror = 0                           ! define numror = 0 -> no restart file to read 
     111            l_1st_euler = .true.                 ! Set time-step indicator at nit000 (euler forward) 
     112            CALL day_init                        ! model calendar (using both namelist and restart infos) 
     113            !                                    ! Initialization of ocean to zero 
    122114            ! 
    123             IF( ll_wd ) THEN 
    124                ssh(:,:,Kbb) =  -ssh_ref  ! Added in 30 here for bathy that adds 30 as Iterative test CEOD  
     115            IF( ln_tsd_init ) THEN                
     116               CALL dta_tsd( nit000, ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
    125117               ! 
    126                ! Apply minimum wetdepth criterion 
     118               uu  (:,:,:,Kbb) = 0._wp               ! set the ocean at rest 
     119               vv  (:,:,:,Kbb) = 0._wp   
    127120               ! 
    128                DO_2D( 1, 1, 1, 1 ) 
    129                   IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN 
    130                      ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) ) 
    131                   ENDIF 
    132                END_2D 
    133             ENDIF  
    134              ! 
    135          ELSE                                 ! user defined initial T and S 
    136             DO jk = 1, jpk 
    137                zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
    138             END DO 
    139             CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb)  )          
    140          ENDIF 
    141          ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
    142          ssh (:,:,Kmm)     = ssh(:,:,Kbb)    
    143          uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    144          vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
    145  
    146 !!gm POTENTIAL BUG : 
    147 !!gm  ISSUE :  if ssh(:,:,Kbb) /= 0  then, in non linear free surface, the e3._n, e3._b should be recomputed 
    148 !!             as well as gdept_ and gdepw_....   !!!!!  
    149 !!      ===>>>>   probably a call to domvvl initialisation here.... 
    150  
     121            ELSE                                 ! user defined initial T and S 
     122               DO jk = 1, jpk 
     123                  zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
     124               END DO 
     125               CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) )          
     126            ENDIF 
     127            ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
     128            uu    (:,:,:,Kmm) = uu   (:,:,:,Kbb) 
     129            vv    (:,:,:,Kmm) = vv   (:,:,:,Kbb) 
    151130 
    152131         ! 
    153 !!gm to be moved in usrdef of C1D case 
    154 !         IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 
    155 !            ALLOCATE( zuvd(jpi,jpj,jpk,2) ) 
    156 !            CALL dta_uvd( nit000, zuvd ) 
    157 !            uu(:,:,:,Kbb) = zuvd(:,:,:,1) ;  uu(:,:,:,Kmm) = uu(:,:,:,Kbb) 
    158 !            vv(:,:,:,Kbb) = zuvd(:,:,:,2) ;  vv(:,:,:,Kmm) = vv(:,:,:,Kbb) 
    159 !            DEALLOCATE( zuvd ) 
    160 !         ENDIF 
     132!!gm ==>>>  to be moved in usrdef_istate of C1D case  
     133         IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 
     134            ALLOCATE( zuvd(jpi,jpj,jpk,2) ) 
     135            CALL dta_uvd( nit000, Kbb, zuvd ) 
     136            uu(:,:,:,Kbb) = zuvd(:,:,:,1) ;  uu(:,:,:,Kmm) = uu(:,:,:,Kbb) 
     137            vv(:,:,:,Kbb) = zuvd(:,:,:,2) ;  vv(:,:,:,Kmm) = vv(:,:,:,Kbb) 
     138            DEALLOCATE( zuvd ) 
     139         ENDIF 
    161140         ! 
    162 !!gm This is to be changed !!!! 
    163 !         ! - ML - ssh(:,:,Kmm) could be modified by istate_eel, so that initialization of e3t(:,:,:,Kbb) is done here 
    164 !         IF( .NOT.ln_linssh ) THEN 
    165 !            DO jk = 1, jpk 
    166 !               e3t(:,:,jk,Kbb) = e3t(:,:,jk,Kmm) 
    167 !            END DO 
    168 !         ENDIF 
    169 !!gm  
    170141         !  
    171       ENDIF  
     142         ENDIF  
    172143#if defined key_agrif 
    173144      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.