Changeset 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DOM/istate.F90
- Timestamp:
- 2021-05-05T13:18:04+02:00 (3 years ago)
- 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 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev _r12970_AGRIF_CMEMSext/AGRIF5 ^/vendors/AGRIF/dev@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 ^/vendors/PPR@HEAD ext/PPR 8 9 9 10 # SETTE 10 ^/utils/CI/sette@1 3559sette11 ^/utils/CI/sette@14244 sette
-
- Property svn:externals
-
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DOM/istate.F90
r13295 r14789 34 34 USE lib_mpp ! MPP library 35 35 USE restart ! restart 36 36 37 #if defined key_agrif 38 USE agrif_oce ! initial state interpolation 37 39 USE agrif_oce_interp 38 USE agrif_oce39 40 #endif 40 41 … … 42 43 PRIVATE 43 44 44 PUBLIC istate_init ! routine called by step.F9045 PUBLIC istate_init ! routine called by nemogcm.F90 45 46 46 47 !! * Substitutions … … 59 60 !! 60 61 !! ** Purpose : Initialization of the dynamics and tracer fields. 62 !! 63 !! ** Method : 61 64 !!---------------------------------------------------------------------- 62 65 INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! ocean time level indices 63 66 ! 64 67 INTEGER :: ji, jj, jk ! dummy loop indices 65 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgdept ! 3D table !!st patch to use gdept subtitute68 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgdept ! 3D table for qco substitute 66 69 !!gm see comment further down 67 70 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: zuvd ! U & V data workspace … … 73 76 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 74 77 75 !!gm Why not include in the first call of dta_tsd ?76 !!gm probably associated with the use of internal damping...77 78 CALL dta_tsd_init ! Initialisation of T & S input data 78 !!gm to be moved in usrdef of C1D case 79 79 80 ! IF( lk_c1d ) CALL dta_uvd_init ! Initialization of U & V input data 80 !!gm81 81 82 rhd (:,:,: ) = 0._wp ; rhop (:,:,: ) = 0._wp ! set one for all to 0 at level jpk83 rn2b (:,:,: ) = 0._wp ; rn2 (:,:,: ) = 0._wp ! set one for all to 0 at levels 1 and jpk84 ts (:,:,:,:,Kaa) = 0._wp ! set one for all to 0 at level jpk85 rab_b(:,:,:,: ) = 0._wp ; rab_n(:,:,:,:) = 0._wp ! set one for all to 0 at level jpk82 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 86 86 #if defined key_agrif 87 87 uu (:,:,: ,Kaa) = 0._wp ! used in agrif_oce_sponge at initialization … … 90 90 91 91 #if defined key_agrif 92 IF ( (.NOT.Agrif_root()).AND.ln_init_chfrpar ) THEN92 IF ( .NOT.Agrif_root() .AND. ln_init_chfrpar ) THEN 93 93 numror = 0 ! define numror = 0 -> no restart file to read 94 94 ln_1st_euler = .true. ! Set time-step indicator at nit000 (euler forward) 95 95 CALL day_init 96 CALL agrif_istate ( Kbb, Kmm, Kaa ) ! Interp from parent96 CALL agrif_istate_oce( Kbb, Kmm, Kaa ) ! Interp from parent 97 97 ! 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) 102 101 ELSE 103 102 #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) 118 107 ! 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 122 114 ! 123 IF( l l_wd ) THEN124 ssh(:,:,Kbb) = -ssh_ref ! Added in 30 here for bathy that adds 30 as Iterative test CEOD115 IF( ln_tsd_init ) THEN 116 CALL dta_tsd( nit000, ts(:,:,:,:,Kbb) ) ! read 3D T and S data at nit000 125 117 ! 126 ! Apply minimum wetdepth criterion 118 uu (:,:,:,Kbb) = 0._wp ! set the ocean at rest 119 vv (:,:,:,Kbb) = 0._wp 127 120 ! 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) 151 130 152 131 ! 153 !!gm to be moved in usrdef of C1D case154 !IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000155 !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 !ENDIF132 !!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 161 140 ! 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 here164 ! IF( .NOT.ln_linssh ) THEN165 ! DO jk = 1, jpk166 ! e3t(:,:,jk,Kbb) = e3t(:,:,jk,Kmm)167 ! END DO168 ! ENDIF169 !!gm170 141 ! 171 ENDIF142 ENDIF 172 143 #if defined key_agrif 173 144 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.