- Timestamp:
- 01/02/13 18:50:00 (11 years ago)
- Location:
- trunk/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r63 r65 188 188 #if defined key_obc 189 189 IF( lk_obc ) CALL obc_dyn( kt ) ! Update velocities on each open boundary with the radiation algorithm 190 IF( lk_obc )CALL obc_vol( kt ) ! Correction of the barotropic componant velocity to control the volume of the system190 IF( lk_obc ) CALL obc_vol( kt ) ! Correction of the barotropic componant velocity to control the volume of the system 191 191 #endif 192 192 #if defined key_bdy … … 307 307 ! multiplied by z2dt 308 308 #if defined key_obc 309 IF(lk_obc) THEN 309 310 ! caution : grad D = 0 along open boundaries 310 311 ! Remark: The filtering force could be reduced here in the FRS zone … … 312 313 spgu(ji,jj) = z2dt * ztdgu * obcumask(ji,jj) 313 314 spgv(ji,jj) = z2dt * ztdgv * obcvmask(ji,jj) 315 ELSE 316 spgu(ji,jj) = z2dt * ztdgu 317 spgv(ji,jj) = z2dt * ztdgv 318 ENDIF 314 319 #elif defined key_bdy 320 IF(lk_bdy) THEN 315 321 ! caution : grad D = 0 along open boundaries 316 322 spgu(ji,jj) = z2dt * ztdgu * bdyumask(ji,jj) 317 323 spgv(ji,jj) = z2dt * ztdgv * bdyvmask(ji,jj) 324 ELSE 325 spgu(ji,jj) = z2dt * ztdgu 326 spgv(ji,jj) = z2dt * ztdgv 327 ENDIF 318 328 #else 319 329 spgu(ji,jj) = z2dt * ztdgu -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r46 r65 89 89 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) 90 90 CHARACTER(len=19) :: cldate 91 !!---------------------------------------------------------------------- 92 93 CALL xios_context_initialize("nemo", mpi_comm_opa) 91 CHARACTER(len=10) :: clname 92 !!---------------------------------------------------------------------- 93 94 clname = "nemo" 95 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 96 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 94 97 CALL iom_swap 95 98 96 99 ! calendar parameters 97 100 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 98 CASE ( 1) ; CALL xios_set_context_attr( "nemo", calendar_type= "Gregorian")99 CASE ( 0) ; CALL xios_set_context_attr( "nemo", calendar_type= "NoLeap")100 CASE (30) ; CALL xios_set_context_attr( "nemo", calendar_type= "D360")101 CASE ( 1) ; CALL xios_set_context_attr(TRIM(clname), calendar_type= "Gregorian") 102 CASE ( 0) ; CALL xios_set_context_attr(TRIM(clname), calendar_type= "NoLeap") 103 CASE (30) ; CALL xios_set_context_attr(TRIM(clname), calendar_type= "D360") 101 104 END SELECT 102 105 WRITE(cldate,"(i4.4,'-',i2.2,'-',i2.2,' 00:00:00')") nyear,nmonth,nday 103 CALL xios_set_context_attr( "nemo", start_date=cldate )106 CALL xios_set_context_attr(TRIM(clname), start_date=cldate ) 104 107 105 108 ! horizontal grid definition … … 341 344 INTEGER :: i_s, i_e ! temporary integer 342 345 CHARACTER(LEN=100) :: clinfo ! info character 343 INTEGER :: inb_period_initial, inb_period_final, inb_period_sec, inb_period_max, inb_period344 346 !--------------------------------------------------------------------- 345 347 ! … … 351 353 i_s = 1 352 354 i_e = jpmax_files 353 #if defined key_iomput354 CALL xios_context_finalize()355 #endif356 355 ENDIF 357 356 -
trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcdta.F90
r9 r65 16 16 USE fldread ! read input fields 17 17 USE in_out_manager ! I/O logical units 18 USE lib_mpp ! for ctl_stop 18 19 19 20 IMPLICIT NONE … … 23 24 PUBLIC obc_dta_bt ! routines called by dynspg_ts.F90 24 25 25 TYPE(FLD), DIMENSION( 16):: sf_obc !: structure:26 TYPE(FLD), DIMENSION(:), ALLOCATABLE :: sf_obc !: structure: 26 27 !!---------------------------------------------------------------------- 27 28 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 40 41 !!--------------------------------------------------------------------- 41 42 ! 43 IF( lk_obc ) THEN 44 42 45 IF( kt == nit000 ) CALL obc_dta_init() 43 46 ! … … 72 75 tfos(:,:) = sf_obc(15)%fnow(:,:,1) 73 76 sfos(:,:) = sf_obc(16)%fnow(:,:,1) 77 ENDIF 78 74 79 ENDIF 75 80 … … 111 116 !! ** Action : - read parameters 112 117 !!--------------------------------------------------------------------------- 113 INTEGER :: ifpr 118 INTEGER :: ifpr,ierror 114 119 CHARACTER(len=100) :: cn_dir ! Root directory for location of core files 115 120 TYPE(FLD_N), DIMENSION(4) :: sn_obce, sn_obcw, sn_obcn, sn_obcs ! array of namelist informations on the obc to read 116 121 NAMELIST/namobc_dta/ sn_obce, sn_obcw, sn_obcn, sn_obcs 117 122 !!--------------------------------------------------------------------- 123 ALLOCATE(sf_obc(16), stat = ierror) 124 IF( ierror > 0 ) CALL ctl_stop('Pb of alloction of sf_obc(16) obc_dta_init') 125 ! 118 126 ! set file information (default values) 119 127 cn_dir = './' ! directory in which the model is executed -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
r37 r65 25 25 !! cpl_prism_finalize : finalize the coupled mode communication 26 26 !!---------------------------------------------------------------------- 27 #if defined key_oasis_mct 28 USE mod_prism 29 #else 27 30 USE mod_prism_proto ! OASIS3 prism module 28 31 USE mod_prism_def_partition_proto! OASIS3 prism module for partitioning … … 30 33 USE mod_prism_get_proto ! OASIS3 prism module for receiving 31 34 USE mod_comprism_proto ! OASIS3 prism module to get coupling frequency 35 #endif 32 36 USE par_oce ! ocean parameters 33 37 USE dom_oce ! ocean space and time domain … … 51 55 INTEGER :: nerror ! return error code 52 56 53 INTEGER, P ARAMETER :: nmaxfld=40 ! Maximum number of coupling fields57 INTEGER, PUBLIC, PARAMETER :: nmaxfld=40 ! Maximum number of coupling fields 54 58 55 59 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information … … 62 66 END TYPE FLD_CPL 63 67 64 TYPE(FLD_CPL), DIMENSION( nmaxfld), PUBLIC :: srcv, ssnd !: Coupling fields68 TYPE(FLD_CPL), DIMENSION(:), ALLOCATABLE, PUBLIC :: srcv, ssnd !: Coupling fields 65 69 66 70 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: exfld ! Temporary buffer for receiving … … 87 91 ! WARNING: No write in numout in this routine 88 92 !============================================ 89 90 93 !------------------------------------------------------------------ 91 94 ! 1st Initialize the PRISM system for the application … … 194 197 zclname=srcv(ji)%clname 195 198 ENDIF 199 #if defined key_agrif 200 IF( agrif_fixed() /= 0 ) THEN 201 zclname=TRIM(Agrif_CFixed())//zclname(2:8) 202 END IF 203 #endif 196 204 IF( ln_ctl ) WRITE(numout,*) "Define",ji,jc,zclname," for",PRISM_In 197 205 CALL prism_def_var_proto ( srcv(ji)%nid(jc), zclname, id_part, (/ 2, 0/), & … … 208 216 ! End of definition phase 209 217 !------------------------------------------------------------------ 210 211 CALL prism_enddef_proto(nerror) 212 IF( nerror /= PRISM_Ok ) CALL prism_abort_proto ( ncomp_id, 'cpl_prism_define', 'Failure in prism_enddef') 213 ! 218 #if defined key_agrif 219 !!$ IF( agrif_fixed() == agrif_nb_fixed_grids() ) THEN 220 IF( .NOT. Agrif_Root() ) THEN 221 #endif 222 WRITE(numout,*) 'before prism_enddef_proto' 223 CALL FLUSH(numout) 224 225 CALL prism_enddef_proto(nerror) 226 IF( nerror /= PRISM_Ok ) CALL prism_abort_proto ( ncomp_id, 'cpl_prism_define', 'Failure in prism_enddef') 227 ! 228 WRITE(numout,*) 'after prism_enddef_proto' 229 CALL FLUSH(numout) 230 #if defined key_agrif 231 ENDIF 232 #endif 233 214 234 END SUBROUTINE cpl_prism_define 215 235 … … 322 342 INTEGER,INTENT(in) :: kid ! variable index 323 343 !!---------------------------------------------------------------------- 324 cpl_prism_freq = ig_def_freq( kid ) 344 !EM OASIS-MCT info not yet available on official distrib 345 ! cpl_prism_freq = ig_def_freq( kid ) 346 cpl_prism_freq = 300 325 347 ! 326 348 END FUNCTION cpl_prism_freq -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r43 r65 58 58 IMPLICIT NONE 59 59 PRIVATE 60 60 !EM XIOS-OASIS-MCT compliance 61 PUBLIC sbc_cpl_init ! routine called by sbcmod.F90 61 62 PUBLIC sbc_cpl_rcv ! routine called by sbc_ice_lim(_2).F90 62 63 PUBLIC sbc_cpl_snd ! routine called by step.F90 … … 221 222 !! 222 223 INTEGER :: jn ! dummy loop index 224 INTEGER :: ierror 223 225 REAL(wp), POINTER, DIMENSION(:,:) :: zacs, zaos 224 226 !! … … 231 233 ! 232 234 CALL wrk_alloc( jpi,jpj, zacs, zaos ) 235 236 ALLOCATE(srcv(nmaxfld), stat = ierror) 237 IF( nerror > 0 ) CALL ctl_stop('Pb of alloction of srcv(nmaxfld) in sbc_cpl_init') 238 ALLOCATE(ssnd(nmaxfld), stat = nerror) 239 IF( nerror > 0 ) CALL ctl_stop('Pb of alloction of ssnd(nmaxfld) in sbc_cpl_init') 233 240 234 241 ! ================================ ! … … 526 533 ssnd(jps_tmix)%clname = 'O_TepMix' 527 534 SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 535 CASE( 'none' ) ! nothing to do 528 536 CASE( 'oce only' ) ; ssnd( jps_toce )%laction = .TRUE. 529 537 CASE( 'weighted oce and ice' ) … … 693 701 CALL wrk_alloc( jpi,jpj, ztx, zty ) 694 702 695 IF( kt == nit000 ) CALL sbc_cpl_init( k_ice ) ! initialisation 703 !EM XIOS/OASIS-MCT compliance 704 !EM IF( kt == nit000 ) CALL sbc_cpl_init( k_ice ) ! initialisation 696 705 697 706 ! ! Receive all the atmos. fields (including ice information) -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r46 r65 63 63 !!---------------------------------------------------------------------- 64 64 !! NEMO/OPA 4.0 , NEMO-consortium (2011) 65 !! $Id: sbcmod.F90 3 415 2012-06-15 13:29:37Z rblod $65 !! $Id: sbcmod.F90 3294 2012-01-28 16:44:18Z rblod $ 66 66 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 67 67 !!---------------------------------------------------------------------- … … 200 200 201 201 IF( nn_ice == 4 ) CALL cice_sbc_init (nsbc) 202 203 !EM modif XIOS/OASIS-MCT compliance 204 IF( nsbc == 5 ) CALL sbc_cpl_init (nn_ice) 202 205 ! 203 206 END SUBROUTINE sbc_init … … 240 243 ! ! ---------------------------------------- ! 241 244 242 ! 245 ! CALL iom_setkt( kt + nn_fsbc - 1 ) ! in sbc, iom_put is called every nn_fsbc time step 243 246 ! 244 247 IF( ln_apr_dyn ) CALL sbc_apr( kt ) ! atmospheric pressure provided at kt+0.5*nn_fsbc … … 343 346 ENDIF 344 347 ! 345 ! 348 ! CALL iom_setkt( kt ) ! iom_put outside of sbc is called at every time step 346 349 ! 347 350 CALL iom_put( "utau", utau ) ! i-wind stress (stress can be updated at -
trunk/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r46 r65 167 167 ! !------------------------! 168 168 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 169 IF(lwp) Write(numout,*) 'Grid Number',Agrif_Fixed() 170 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 169 171 ! 170 172 IF( nstop /= 0 .AND. lwp ) THEN ! error print … … 182 184 ! 183 185 CALL nemo_closefile 184 #if defined key_oasis3 || defined key_oasis4185 CALL cpl_prism_finalize ! end coupling and mpp communications with OASIS186 #else187 186 # if defined key_iomput 188 187 IF( Agrif_Root() ) THEN 189 CALL xios_finalize ! end mpp communications188 CALL xios_finalize ! end mpp communications 190 189 ENDIF 191 190 # else 192 191 IF( lk_mpp ) CALL mppstop ! end mpp communications 193 192 # endif 193 #if defined key_oasis3 || defined key_oasis4 194 IF( Agrif_Root() ) THEN 195 CALL cpl_prism_finalize ! end coupling and mpp communications with OASIS 196 ENDIF 194 197 #endif 195 198 ! … … 228 231 CALL xios_initialize( "oceanx",local_comm=ilocal_comm ) 229 232 # else 230 CALL 233 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) 231 234 # endif 232 235 ENDIF … … 326 329 IF( lk_bdy ) CALL tide_init ! Open boundaries initialisation of tidal harmonic forcing 327 330 328 CALL flush(numout)329 331 CALL dyn_nept_init ! simplified form of Neptune effect 330 CALL flush(numout)331 332 332 333 CALL istate_init ! ocean initial state (Dynamics and tracers) … … 582 583 ENDIF 583 584 ! 585 IF( jpnj < jpni ) THEN 586 ji = jpni 587 jpni = jpnj 588 jpnj = ji 589 ENDIF 590 ! 584 591 jpnij = jpni*jpnj 585 592 ! -
trunk/NEMOGCM/NEMO/OPA_SRC/step.F90
r46 r65 40 40 PRIVATE 41 41 42 #if defined key_mpp_mpi 43 INCLUDE 'mpif.h' 44 #endif 42 45 PUBLIC stp ! called by opa.F90 43 46 … … 78 81 INTEGER :: indic ! error indicator if < 0 79 82 80 INTEGER :: inb_period_initial, inb_period_final, inb_period_sec, inb_period_max, inb_period83 REAL(kind=wp) :: t_start 81 84 !! --------------------------------------------------------------------- 82 85 83 CALL SYSTEM_CLOCK(count_rate=inb_period_sec, count_max=inb_period_max) 84 CALL SYSTEM_CLOCK(count=inb_period_initial) 86 #if defined key_mpp_mpi 87 t_start = MPI_Wtime() 88 #endif 85 89 #if defined key_agrif 86 90 kstp = nit000 + Agrif_Nb_Step() … … 270 274 IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset 271 275 ! 272 CALL SYSTEM_CLOCK(count=inb_period_final) 273 inb_period = inb_period_final - inb_period_initial 274 IF( inb_period_final < inb_period_initial ) inb_period = inb_period + inb_period_max 275 IF( lwp ) WRITE(numout,'(a, i6, f10.5)') 'step timing', kstp, REAL(inb_period,wp) / REAL(inb_period_sec,wp) 276 #if defined key_mpp_mpi 277 IF( lwp ) WRITE(numout,'(a, i6, f10.5)') 'step timing ', kstp, MPI_WTIME() - t_start 278 #endif 279 ! 280 #if defined key_iomput 281 IF( kstp == nitend ) CALL xios_context_finalize() 282 #endif 276 283 ! 277 284 END SUBROUTINE stp
Note: See TracChangeset
for help on using the changeset viewer.