Changeset 12249
- Timestamp:
- 2019-12-13T19:48:00+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg
r12199 r12249 278 278 &namctl ! Control prints (default: OFF) 279 279 !----------------------------------------------------------------------- 280 ln_ctl = .false.281 280 / 282 281 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg
r12199 r12249 278 278 &namctl ! Control prints (default: OFF) 279 279 !----------------------------------------------------------------------- 280 ln_ctl = .false.281 280 / 282 281 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg
r12199 r12249 278 278 &namctl ! Control prints (default: OFF) 279 279 !----------------------------------------------------------------------- 280 ln_ctl = .false.281 280 / 282 281 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg
r12199 r12249 278 278 &namctl ! Control prints (default: OFF) 279 279 !----------------------------------------------------------------------- 280 ln_ctl = .false.281 280 / 282 281 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ncar_cfg
r12199 r12249 278 278 &namctl ! Control prints (default: OFF) 279 279 !----------------------------------------------------------------------- 280 ln_ctl = .false.281 280 / 282 281 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/diawri.F90
r11831 r12249 25 25 !! dia_wri_state : create an output NetCDF file for a single instantaeous ocean state and forcing fields 26 26 !!---------------------------------------------------------------------- 27 USE oce ! ocean dynamics and tracers 27 USE oce ! ocean dynamics and tracers 28 28 USE dom_oce ! ocean space and time domain 29 29 USE phycst ! physical constants … … 33 33 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 34 34 USE in_out_manager ! I/O manager 35 USE iom ! 36 USE ioipsl ! 35 USE iom ! 36 USE ioipsl ! 37 37 #if defined key_si3 38 USE ice 39 USE icewri 38 USE ice 39 USE icewri 40 40 #endif 41 41 USE lib_mpp ! MPP library … … 74 74 END FUNCTION dia_wri_alloc 75 75 76 77 SUBROUTINE dia_wri( kt )76 77 SUBROUTINE dia_wri( kt, Kmm ) 78 78 !!--------------------------------------------------------------------- 79 79 !! *** ROUTINE dia_wri *** 80 !! 81 !! ** Purpose : Standard output of opa: dynamics and tracer fields 82 !! NETCDF format is used by default 83 !! Standalone surface scheme80 !! 81 !! ** Purpose : Standard output of opa: dynamics and tracer fields 82 !! NETCDF format is used by default 83 !! STATION_ASF 84 84 !! 85 85 !! ** Method : use iom_put 86 86 !!---------------------------------------------------------------------- 87 87 INTEGER, INTENT( in ) :: kt ! ocean time-step index 88 !!---------------------------------------------------------------------- 89 ! 88 INTEGER, INTENT( in ) :: Kmm ! ocean time level index 89 !!---------------------------------------------------------------------- 90 ! 91 IF( ln_timing ) CALL timing_start('dia_wri') 92 ! 90 93 ! Output the initial state and forcings 91 IF( ninist == 1 ) THEN 92 CALL dia_wri_state( 'output.init' )94 IF( ninist == 1 ) THEN 95 CALL dia_wri_state( Kmm, 'output.init' ) 93 96 ninist = 0 94 97 ENDIF … … 99 102 CALL iom_put( "ssu", ssu_m(:,:) ) ! ocean surface current along i-axis 100 103 CALL iom_put( "ssv", ssv_m(:,:) ) ! ocean surface current along j-axis 104 ! 105 IF( ln_timing ) CALL timing_stop('dia_wri') 101 106 ! 102 107 END SUBROUTINE dia_wri … … 115 120 & ndex_hU(jpi*jpj) , ndex_U(jpi*jpj*jpk) , & 116 121 & ndex_hV(jpi*jpj) , ndex_V(jpi*jpj*jpk) , STAT=ierr(1) ) 117 122 ! 118 123 dia_wri_alloc = MAXVAL(ierr) 119 124 CALL mpp_sum( 'diawri', dia_wri_alloc ) … … 121 126 END FUNCTION dia_wri_alloc 122 127 123 124 SUBROUTINE dia_wri( kt ) 128 129 130 SUBROUTINE dia_wri( kt, Kmm ) 125 131 !!--------------------------------------------------------------------- 126 132 !! *** ROUTINE dia_wri *** 127 !! 128 !! ** Purpose : Standard output of opa: dynamics and tracer fields 129 !! NETCDF format is used by default 130 !! 131 !! ** Method : At the beginning of the first time step (nit000), 133 !! 134 !! ** Purpose : Standard output of opa: dynamics and tracer fields 135 !! NETCDF format is used by default 136 !! 137 !! ** Method : At the beginning of the first time step (nit000), 132 138 !! define all the NETCDF files and fields 133 139 !! At each time step call histdef to compute the mean if ncessary 134 !! Each n write time step, output the instantaneous or mean fields140 !! Each nn_write time step, output the instantaneous or mean fields 135 141 !!---------------------------------------------------------------------- 136 142 INTEGER, INTENT( in ) :: kt ! ocean time-step index 143 INTEGER, INTENT( in ) :: Kmm ! ocean time level index 137 144 ! 138 145 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout … … 144 151 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 145 152 !!---------------------------------------------------------------------- 146 ! 153 ! 154 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! 155 CALL dia_wri_state( Kmm, 'output.init' ) 156 ninist = 0 157 ENDIF 158 ! 159 IF( nn_write == -1 ) RETURN ! we will never do any output 160 ! 147 161 IF( ln_timing ) CALL timing_start('dia_wri') 148 !149 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==!150 CALL dia_wri_state( 'output.init' )151 ninist = 0152 ENDIF153 162 ! 154 163 ! 0. Initialisation … … 159 168 160 169 ! Define frequency of output and means 161 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 162 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 163 ENDIF 170 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 164 171 #if defined key_diainstant 165 zsto = n write * rdt172 zsto = nn_write * rdt 166 173 clop = "inst("//TRIM(clop)//")" 167 174 #else … … 169 176 clop = "ave("//TRIM(clop)//")" 170 177 #endif 171 zout = n write * rdt178 zout = nn_write * rdt 172 179 zmax = ( nitend - nit000 + 1 ) * rdt 173 180 … … 196 203 & ' MONTH ', nmonth, ' DAY ', nday, 'Julian day : ', zjulian 197 204 IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma, & 198 205 ' limit storage in depth = ', ipk 199 206 200 207 ! WRITE root name in date.file for use by postpro 201 208 IF(lwp) THEN 202 CALL dia_nam( clhstnam, n write,' ' )209 CALL dia_nam( clhstnam, nn_write,' ' ) 203 210 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 204 211 WRITE(inum,*) clhstnam … … 208 215 ! Define the T grid FILE ( nid_T ) 209 216 210 CALL dia_nam( clhstnam, n write, 'grid_T' )217 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 211 218 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 212 219 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 220 227 ! Define the U grid FILE ( nid_U ) 221 228 222 CALL dia_nam( clhstnam, n write, 'grid_U' )229 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 223 230 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 224 231 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 232 239 ! Define the V grid FILE ( nid_V ) 233 240 234 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename241 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 235 242 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 236 243 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 254 261 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 255 262 CALL histdef( nid_T, "sosfldow", "downward salt flux" , "PSU/m2/s", & ! (sfx) 256 263 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 257 264 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qns + qsr 258 265 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 291 298 ! --------------------- 292 299 293 ! ndex(1) est utilise ssi l'avant dernier argument est different de 300 ! ndex(1) est utilise ssi l'avant dernier argument est different de 294 301 ! la taille du tableau en sortie. Dans ce cas , l'avant dernier argument 295 302 ! donne le nombre d'elements, et ndex la liste des indices a sortir 296 303 297 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN304 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 298 305 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 299 306 WRITE(numout,*) '~~~~~~ ' … … 304 311 CALL histwrite( nid_T, "sss_m", it, sss_m, ndim_hT, ndex_hT ) ! sea surface salinity 305 312 CALL histwrite( nid_T, "sowaflup", it, (emp - rnf ) , ndim_hT, ndex_hT ) ! upward water flux 306 CALL histwrite( nid_T, "sosfldow", it, sfx , ndim_hT, ndex_hT ) ! downward salt flux 307 ! (includes virtual salt flux beneath ice308 313 CALL histwrite( nid_T, "sosfldow", it, sfx , ndim_hT, ndex_hT ) ! downward salt flux 314 ! (includes virtual salt flux beneath ice 315 ! in linear free surface case) 309 316 310 317 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 311 318 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux 312 CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction 313 CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed 314 315 319 CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction 320 CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed 321 322 ! Write fields on U grid 316 323 CALL histwrite( nid_U, "ssu_m" , it, ssu_m , ndim_hU, ndex_hU ) ! i-current speed 317 324 CALL histwrite( nid_U, "sozotaux", it, utau , ndim_hU, ndex_hU ) ! i-wind stress 318 325 319 326 ! Write fields on V grid 320 327 CALL histwrite( nid_V, "ssv_m" , it, ssv_m , ndim_hV, ndex_hV ) ! j-current speed 321 328 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress … … 334 341 #endif 335 342 336 SUBROUTINE dia_wri_state( cdfile_name )343 SUBROUTINE dia_wri_state( Kmm, cdfile_name ) 337 344 !!--------------------------------------------------------------------- 338 345 !! *** ROUTINE dia_wri_state *** 339 !! 340 !! ** Purpose : create a NetCDF file named cdfile_name which contains 346 !! 347 !! ** Purpose : create a NetCDF file named cdfile_name which contains 341 348 !! the instantaneous ocean state and forcing fields. 342 349 !! Used to find errors in the initial state or save the last … … 347 354 !! File 'output.abort.nc' is created in case of abnormal job end 348 355 !!---------------------------------------------------------------------- 356 INTEGER , INTENT( in ) :: Kmm ! time level index 349 357 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 350 358 !! 351 359 INTEGER :: inum 352 360 !!---------------------------------------------------------------------- 353 ! 361 ! 354 362 IF(lwp) WRITE(numout,*) 355 363 IF(lwp) WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state' … … 358 366 359 367 #if defined key_si3 360 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl )368 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl ) 361 369 #else 362 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. )363 #endif 364 365 CALL iom_rstput( 0, 0, inum, 'votemper', ts n(:,:,:,jp_tem) ) ! now temperature366 CALL iom_rstput( 0, 0, inum, 'vosaline', ts n(:,:,:,jp_sal) ) ! now salinity367 CALL iom_rstput( 0, 0, inum, 'sossheig', ssh n) ! sea surface height368 CALL iom_rstput( 0, 0, inum, 'vozocrtx', u n) ! now i-velocity369 CALL iom_rstput( 0, 0, inum, 'vomecrty', v n) ! now j-velocity370 CALL iom_rstput( 0, 0, inum, 'vovecrtz', wn) ! now k-velocity370 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 371 #endif 372 373 CALL iom_rstput( 0, 0, inum, 'votemper', ts(:,:,:,jp_tem,Kmm) ) ! now temperature 374 CALL iom_rstput( 0, 0, inum, 'vosaline', ts(:,:,:,jp_sal,Kmm) ) ! now salinity 375 CALL iom_rstput( 0, 0, inum, 'sossheig', ssh(:,:,Kmm) ) ! sea surface height 376 CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm) ) ! now i-velocity 377 CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm) ) ! now j-velocity 378 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 371 379 CALL iom_rstput( 0, 0, inum, 'sowaflup', emp - rnf ) ! freshwater budget 372 380 CALL iom_rstput( 0, 0, inum, 'sohefldo', qsr + qns ) ! total heat flux … … 375 383 CALL iom_rstput( 0, 0, inum, 'sozotaux', utau ) ! i-wind stress 376 384 CALL iom_rstput( 0, 0, inum, 'sometauy', vtau ) ! j-wind stress 377 385 378 386 #if defined key_si3 379 387 IF( nn_ice == 2 ) THEN ! condition needed in case agrif + ice-model but no-ice in child grid … … 383 391 ! 384 392 CALL iom_close( inum ) 385 ! 393 ! 386 394 END SUBROUTINE dia_wri_state 387 395 -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/nemogcm.F90
r11831 r12249 8 8 !! - ! 2014-12 (G. Madec) remove KPP scheme and cross-land advection (cla) 9 9 !! 4.0 ! 2016-10 (G. Madec, S. Flavoni) domain configuration / user defined interface 10 !! 4.x ! 2019-12 (L. Brodeau) STATION_ASF test-case 10 11 !!---------------------------------------------------------------------- 11 12 … … 18 19 !!---------------------------------------------------------------------- 19 20 USE step_oce ! module used in the ocean time stepping module (step.F90) 20 USE sbc_oce ! surface boundary condition: ocean 21 USE sbc_oce ! surface boundary condition: ocean #LB: rm? 21 22 USE phycst ! physical constant (par_cst routine) 22 23 USE domain ! domain initialization (dom_init & dom_cfg routines) 23 24 USE closea ! treatment of closed seas (for ln_closea) 24 25 USE usrdef_nam ! user defined configuration 26 USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices 25 27 USE daymod ! calendar 26 28 USE restart ! open restart file … … 84 86 istp = nit000 85 87 ! 86 #if defined key_c1d87 88 DO WHILE ( istp <= nitend .AND. nstop == 0 ) !== C1D time-stepping ==! 88 89 CALL stp_c1d( istp ) 89 90 istp = istp + 1 90 91 END DO 91 #else92 !93 IF( .NOT.ln_diurnal_only ) THEN !== Standard time-stepping ==!94 !95 DO WHILE( istp <= nitend .AND. nstop == 0 )96 97 ncom_stp = istp98 IF( ln_timing ) THEN99 zstptiming = MPI_Wtime()100 IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming101 IF ( istp == nitend ) elapsed_time = zstptiming - elapsed_time102 ENDIF103 104 CALL stp ( istp )105 istp = istp + 1106 107 IF( lwp .AND. ln_timing ) WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming108 109 END DO110 !111 ELSE !== diurnal SST time-steeping only ==!112 !113 DO WHILE( istp <= nitend .AND. nstop == 0 )114 CALL stp_diurnal( istp ) ! time step only the diurnal SST115 istp = istp + 1116 END DO117 !118 ENDIF119 !120 #endif121 92 ! 122 93 ! !------------------------! … … 158 129 INTEGER :: ios, ilocal_comm ! local integers 159 130 !! 160 NAMELIST/namctl/ ln_ctl , sn_cfctl, nn_print, nn_ictls, nn_ictle,&131 NAMELIST/namctl/ sn_cfctl, nn_print, nn_ictls, nn_ictle, & 161 132 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 162 133 & ln_timing, ln_diacfl … … 173 144 #if defined key_iomput 174 145 IF( Agrif_Root() ) THEN 175 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios146 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios 176 147 ENDIF 177 148 CALL mpp_start( ilocal_comm ) 178 149 #else 179 CALL mpp_start( )150 CALL mpp_start( ) 180 151 #endif 181 152 ! … … 190 161 IF( lwm ) CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 191 162 ! open reference and configuration namelist files 192 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE.)193 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE.)163 CALL load_nml( numnam_ref, 'namelist_ref', -1, lwm ) 164 CALL load_nml( numnam_cfg, 'namelist_cfg', -1, lwm ) 194 165 IF( lwm ) CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 195 166 ! open /dev/null file to be able to supress output write easily … … 197 168 ! 198 169 ! !--------------------! 199 ! ! Open listing units ! -> need ln_ctl from namctl to define lwp170 ! ! Open listing units ! -> need sn_cfctl from namctl to define lwp 200 171 ! !--------------------! 201 172 ! 202 REWIND( numnam_ref ) ! Namelist namctl in reference namelist203 173 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 204 174 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist' ) 205 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist206 175 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 207 176 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 208 177 ! 209 lwp = (narea == 1) .OR. ln_ctl! control of all listing output print178 lwp = (narea == 1) .OR. sn_cfctl%l_oceout ! control of all listing output print 210 179 ! 211 180 IF(lwp) THEN ! open listing units … … 239 208 ENDIF 240 209 ! 241 ! finalize the definition of namctl variables242 IF( sn_cfctl%l_config ) THEN243 ! Activate finer control of report outputs244 ! optionally switch off output from selected areas (note this only245 ! applies to output which does not involve global communications)246 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. &247 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) &248 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. )249 ELSE250 ! Use ln_ctl to turn on or off all options.251 CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. )252 ENDIF253 !254 210 IF(lwm) WRITE( numond, namctl ) 255 211 ! … … 258 214 ! !------------------------------------! 259 215 ! 260 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist261 216 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 262 217 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 263 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist264 218 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 265 219 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) … … 281 235 CALL nemo_alloc() 282 236 237 ! Initialise time level indices 238 Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 239 283 240 ! !-------------------------------! 284 241 ! ! NEMO general initialization ! … … 294 251 CALL eos_init ! Equation of state 295 252 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 296 CALL dom_init("OPA") ! Domain 297 IF( ln_ctl ) CALL prt_ctl_init ! Print control 298 299 CALL day_init ! model calendar (using both namelist and restart infos) 300 IF( ln_rstart ) CALL rst_read_open 253 CALL dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 254 IF( sn_cfctl%l_prtctl ) & 255 & CALL prt_ctl_init ! Print control 256 257 IF( ln_rstart ) THEN ! Restart from a file 258 ! ! ------------------- 259 CALL rst_read( Nbb, Nnn ) ! Read the restart file 260 CALL day_init ! model calendar (using both namelist and restart infos) 261 ! 262 ELSE ! Start from rest 263 ! ! --------------- 264 numror = 0 ! define numror = 0 -> no restart file to read 265 neuler = 0 ! Set time-step indicator at nit000 (euler forward) 266 CALL day_init ! model calendar (using both namelist and restart infos) 267 ENDIF 268 ! 301 269 302 270 ! ! external forcing 303 CALL sbc_init ! surface boundary conditions (including sea-ice)271 CALL sbc_init( Nbb, Nnn, Naa ) ! surface boundary conditions (including sea-ice) 304 272 305 273 ! … … 325 293 WRITE(numout,*) '~~~~~~~~' 326 294 WRITE(numout,*) ' Namelist namctl' 327 WRITE(numout,*) ' run control (for debugging) ln_ctl = ', ln_ctl 295 WRITE(numout,*) ' sn_cfctl%l_glochk = ', sn_cfctl%l_glochk 296 WRITE(numout,*) ' sn_cfctl%l_allon = ', sn_cfctl%l_allon 328 297 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config 329 298 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat … … 331 300 WRITE(numout,*) ' sn_cfctl%l_oceout = ', sn_cfctl%l_oceout 332 301 WRITE(numout,*) ' sn_cfctl%l_layout = ', sn_cfctl%l_layout 333 WRITE(numout,*) ' sn_cfctl%l_mppout = ', sn_cfctl%l_mppout 334 WRITE(numout,*) ' sn_cfctl%l_mpptop = ', sn_cfctl%l_mpptop 302 WRITE(numout,*) ' sn_cfctl%l_prtctl = ', sn_cfctl%l_prtctl 303 WRITE(numout,*) ' sn_cfctl%l_prttrc = ', sn_cfctl%l_prttrc 304 WRITE(numout,*) ' sn_cfctl%l_oasout = ', sn_cfctl%l_oasout 335 305 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 336 306 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax … … 370 340 ! ! Parameter control 371 341 ! 372 IF( ln_ctl ) THEN! sub-domain area indices for the control prints342 IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN ! sub-domain area indices for the control prints 373 343 IF( lk_mpp .AND. jpnij > 1 ) THEN 374 344 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain … … 427 397 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 428 398 IF( numrun /= -1 ) CLOSE( numrun ) ! run statistics file 429 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist430 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist431 399 IF( lwm.AND.numond /= -1 ) CLOSE( numond ) ! oce output namelist 432 IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist433 IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist434 400 IF( lwm.AND.numoni /= -1 ) CLOSE( numoni ) ! ice output namelist 435 401 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) … … 488 454 sn_cfctl%l_oceout = setto 489 455 sn_cfctl%l_layout = setto 490 sn_cfctl%l_mppout = setto 491 sn_cfctl%l_mpptop = setto 456 sn_cfctl%l_prtctl = setto 457 sn_cfctl%l_prttrc = setto 458 sn_cfctl%l_oasout = setto 492 459 END SUBROUTINE nemo_set_cfctl 493 460 -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/sbcssm.F90
r11831 r12249 14 14 USE c1d ! 1D configuration: lk_c1d 15 15 USE dom_oce ! ocean domain: variables 16 !LB:USE zdf_oce ! ocean vertical physics: variables17 16 USE sbc_oce ! surface module: variables 18 17 USE phycst ! physical constants 19 18 USE eosbn2 ! equation of state - Brunt Vaisala frequency 20 19 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 21 !LB:USE zpshde ! z-coord. with partial steps: horizontal derivatives22 !LB:USE closea ! for ln_closea23 20 ! 24 21 USE in_out_manager ! I/O manager … … 26 23 USE lib_mpp ! distributed memory computing library 27 24 USE prtctl ! print control 28 USE fldread ! read input fields 25 USE fldread ! read input fields 29 26 USE timing ! Timing 30 27 … … 32 29 PRIVATE 33 30 34 PUBLIC sbc_ssm ! routine called by step.F9035 PUBLIC sbc_ssm _init ! routine called by sbcmod.F9031 PUBLIC sbc_ssm_init ! called by sbc_init 32 PUBLIC sbc_ssm ! called by sbc 36 33 37 34 CHARACTER(len=100) :: cn_dir ! Root directory for location of ssm files 38 35 LOGICAL :: ln_3d_uve ! specify whether input velocity data is 3D 39 36 LOGICAL :: ln_read_frq ! specify whether we must read frq or not 40 37 41 38 LOGICAL :: l_sasread ! Ice intilisation: =T read a file ; =F anaytical initilaistion 42 39 LOGICAL :: l_initdone = .false. … … 62 59 CONTAINS 63 60 64 SUBROUTINE sbc_ssm( kt )61 SUBROUTINE sbc_ssm( kt, Kbb, Kmm ) 65 62 !!---------------------------------------------------------------------- 66 63 !! *** ROUTINE sbc_ssm *** … … 69 66 !! for an off-line simulation using surface processes only 70 67 !! 71 !! ** Method : calculates the position of data 68 !! ** Method : calculates the position of data 72 69 !! - interpolates data if needed 73 70 !!---------------------------------------------------------------------- 74 71 INTEGER, INTENT(in) :: kt ! ocean time-step index 72 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 73 ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90) 75 74 ! 76 75 INTEGER :: ji, jj ! dummy loop indices … … 80 79 ! 81 80 IF( ln_timing ) CALL timing_start( 'sbc_ssm') 82 81 83 82 IF ( l_sasread ) THEN 84 83 IF( nfld_3d > 0 ) CALL fld_read( kt, 1, sf_ssm_3d ) !== read data at kt time step ==! 85 84 IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d ) !== read data at kt time step ==! 86 ! 85 ! 87 86 IF( ln_3d_uve ) THEN 88 87 IF( .NOT. ln_linssh ) THEN 89 e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 88 e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 90 89 ELSE 91 90 e3t_m(:,:) = e3t_0(:,:,1) ! vertical scale factor 92 91 ENDIF 93 92 ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 94 ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 93 ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 95 94 ELSE 96 95 IF( .NOT. ln_linssh ) THEN 97 e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 96 e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 98 97 ELSE 99 98 e3t_m(:,:) = e3t_0(:,:,1) ! vertical scale factor 100 99 ENDIF 101 100 ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 102 ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 101 ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 103 102 ENDIF 104 103 ! … … 119 118 IF( .NOT. ln_linssh ) e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D 120 119 frq_m(:,:) = 1._wp ! - - 121 ssh n (:,:) = 0._wp ! - -122 ENDIF 123 120 ssh (:,:,Kmm) = 0._wp ! - - 121 ENDIF 122 124 123 IF ( nn_ice == 1 ) THEN 125 ts n(:,:,1,jp_tem) = sst_m(:,:)126 ts n(:,:,1,jp_sal) = sss_m(:,:)127 ts b(:,:,1,jp_tem) = sst_m(:,:)128 ts b(:,:,1,jp_sal) = sss_m(:,:)129 ENDIF 130 u b (:,:,1) = ssu_m(:,:)131 v b (:,:,1) = ssv_m(:,:)132 133 IF( ln_ctl) THEN! print control124 ts(:,:,1,jp_tem,Kmm) = sst_m(:,:) 125 ts(:,:,1,jp_sal,Kmm) = sss_m(:,:) 126 ts(:,:,1,jp_tem,Kbb) = sst_m(:,:) 127 ts(:,:,1,jp_sal,Kbb) = sss_m(:,:) 128 ENDIF 129 uu (:,:,1,Kbb) = ssu_m(:,:) 130 vv (:,:,1,Kbb) = ssv_m(:,:) 131 132 IF(sn_cfctl%l_prtctl) THEN ! print control 134 133 CALL prt_ctl(tab2d_1=sst_m, clinfo1=' sst_m - : ', mask1=tmask ) 135 134 CALL prt_ctl(tab2d_1=sss_m, clinfo1=' sss_m - : ', mask1=tmask ) … … 156 155 157 156 158 SUBROUTINE sbc_ssm_init 157 SUBROUTINE sbc_ssm_init( Kbb, Kmm ) 159 158 !!---------------------------------------------------------------------- 160 159 !! *** ROUTINE sbc_ssm_init *** 161 160 !! 162 !! ** Purpose : Initialisation of sea surface mean data 163 !!---------------------------------------------------------------------- 161 !! ** Purpose : Initialisation of sea surface mean data 162 !!---------------------------------------------------------------------- 163 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 164 ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90) 164 165 INTEGER :: ierr, ierr0, ierr1, ierr2, ierr3 ! return error code 165 166 INTEGER :: ifpr ! dummy loop indice … … 186 187 ENDIF 187 188 ! 188 REWIND( numnam_ref ) ! Namelist namsbc_sas in reference namelist : Input fields189 189 READ ( numnam_ref, namsbc_sas, IOSTAT = ios, ERR = 901) 190 190 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_sas in reference namelist' ) 191 REWIND( numnam_cfg ) ! Namelist namsbc_sas in configuration namelist : Input fields192 191 READ ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 ) 193 192 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist' ) 194 193 IF(lwm) WRITE ( numond, namsbc_sas ) 195 ! 194 ! 196 195 IF(lwp) THEN ! Control print 197 196 WRITE(numout,*) ' Namelist namsbc_sas' 198 WRITE(numout,*) ' Initialisation using an input file l_sasread = ', l_sasread 197 WRITE(numout,*) ' Initialisation using an input file l_sasread = ', l_sasread 199 198 WRITE(numout,*) ' Are we supplying a 3D u,v and e3 field ln_3d_uve = ', ln_3d_uve 200 199 WRITE(numout,*) ' Are we reading frq (fraction of qsr absorbed in the 1st T level) ln_read_frq = ', ln_read_frq … … 220 219 nn_fwb = 0 221 220 ENDIF 222 223 ! 221 222 ! 224 223 IF( l_sasread ) THEN ! store namelist information in an array 225 ! 224 ! 226 225 !! following code is a bit messy, but distinguishes between when u,v are 3d arrays and 227 226 !! when we have other 3d arrays that we need to read in … … 269 268 ENDIF 270 269 ! 271 ierr1 = 0 ! default definition if slf_?d(ifpr)%ln_tint = .false. 270 ierr1 = 0 ! default definition if slf_?d(ifpr)%ln_tint = .false. 272 271 IF( nfld_3d > 0 ) THEN 273 272 ALLOCATE( sf_ssm_3d(nfld_3d), STAT=ierr ) ! set sf structure … … 276 275 ENDIF 277 276 DO ifpr = 1, nfld_3d 278 277 ALLOCATE( sf_ssm_3d(ifpr)%fnow(jpi,jpj,jpk) , STAT=ierr0 ) 279 278 IF( slf_3d(ifpr)%ln_tint ) ALLOCATE( sf_ssm_3d(ifpr)%fdta(jpi,jpj,jpk,2) , STAT=ierr1 ) 280 279 IF( ierr0 + ierr1 > 0 ) THEN … … 292 291 ENDIF 293 292 DO ifpr = 1, nfld_2d 294 293 ALLOCATE( sf_ssm_2d(ifpr)%fnow(jpi,jpj,1) , STAT=ierr0 ) 295 294 IF( slf_2d(ifpr)%ln_tint ) ALLOCATE( sf_ssm_2d(ifpr)%fdta(jpi,jpj,1,2) , STAT=ierr1 ) 296 295 IF( ierr0 + ierr1 > 0 ) THEN … … 307 306 ENDIF 308 307 ! 309 CALL sbc_ssm( nit000 ) ! need to define ss?_m arrays used in iceistate308 CALL sbc_ssm( nit000, Kbb, Kmm ) ! need to define ss?_m arrays used in iceistate 310 309 l_initdone = .TRUE. 311 310 ! -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90
r11930 r12249 6 6 !! History : 2.0 ! 2004-04 (C. Ethe) adapted from step.F90 for C1D 7 7 !! 3.0 ! 2008-04 (G. Madec) redo the adaptation to include SBC 8 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 9 !! 4.1 ! 2019-12 (L. Brodeau) STATION_ASF test-case 8 10 !!---------------------------------------------------------------------- 9 11 #if defined key_c1d 10 12 !!---------------------------------------------------------------------- 11 13 !! 'key_c1d' 1D Configuration 12 !!---------------------------------------------------------------------- 14 !!---------------------------------------------------------------------- 13 15 !! stp_c1d : NEMO system time-stepping in c1d case 14 16 !!---------------------------------------------------------------------- 15 USE step_oce ! time stepping definition modules 16 !LB:USE dyncor_c1d ! Coriolis term (c1d case) (dyn_cor_1d ) 17 !LB:USE dynnxt ! time-stepping (dyn_nxt routine) 18 !LB:USE dyndmp ! U & V momentum damping (dyn_dmp routine) 19 USE restart ! restart 17 USE step_oce ! time stepping definition modules 18 USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices 19 USE restart ! restart 20 20 21 21 IMPLICIT NONE 22 22 PRIVATE 23 23 24 PUBLIC 24 PUBLIC stp_c1d ! called by nemogcm.F90 25 25 26 26 !!---------------------------------------------------------------------- … … 34 34 !!---------------------------------------------------------------------- 35 35 !! *** ROUTINE stp_c1d *** 36 !! 36 !! 37 37 !! ** Purpose : - Time stepping of SBC including sea ice (dynamic and thermodynamic eqs.) 38 38 !! - Time stepping of OPA (momentum and active tracer eqs.) 39 39 !! - Time stepping of TOP (passive tracer eqs.) 40 !! 41 !! ** Method : -1- Update forcings and data 42 !! -2- Update vertical ocean physics 43 !! -3- Compute the t and s trends 44 !! -4- Update t and s 40 !! 41 !! ** Method : -1- Update forcings and data 42 !! -2- Update vertical ocean physics 43 !! -3- Compute the t and s trends 44 !! -4- Update t and s 45 45 !! -5- Compute the momentum trends 46 46 !! -6- Update the horizontal velocity … … 54 54 !! --------------------------------------------------------------------- 55 55 56 56 indic = 0 ! reset to no error condition 57 57 IF( kstp == nit000 ) CALL iom_init( "nemo") ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 58 58 IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) 59 59 CALL iom_setkt( kstp - nit000 + 1, "nemo" ) ! say to iom that we are at time step kstp 60 60 61 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 61 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 62 ! Update data, open boundaries, surface boundary condition (including sea-ice) 63 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 64 CALL sbc ( kstp, Nbb, Nnn ) ! Sea Boundary Condition (including sea-ice) 62 65 63 CALL dia_wri( kstp )! ocean model: outputs66 CALL dia_wri( kstp, Nnn ) ! ocean model: outputs 64 67 65 68 ! Swap time levels 69 Nrhs = Nbb 70 Nbb = Nnn 71 Nnn = Naa 72 Naa = Nrhs 73 66 74 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 67 ! Control 75 ! Control and restarts 68 76 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 69 CALL stp_ctl( kstp, indic ) 70 IF( indic < 0 ) THEN 71 CALL ctl_stop( 'step: indic < 0' ) 72 CALL dia_wri_state( 'output.abort' ) 73 ENDIF 74 75 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 76 77 !#LB: from C1D: 78 IF( lrst_oce ) CALL rst_write( kstp ) ! write output ocean restart file 77 CALL stp_ctl( kstp, Nbb, Nnn, indic ) 78 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 79 IF( lrst_oce ) CALL rst_write( kstp, Nbb, Nnn ) ! write output ocean restart file 79 80 ! 80 81 #if defined key_iomput 81 82 IF( kstp == nitend .OR. indic < 0 ) CALL xios_context_finalize() ! needed for XIOS 83 ! 82 84 #endif 83 84 !#LB: from SAS"85 !#if defined key_iomput86 ! IF( kstp == nitrst ) THEN87 ! IF(.NOT.lwxios) THEN88 ! CALL iom_close( numrow )89 ! ELSE90 ! CALL iom_context_finalize( cwxios_context )91 ! ENDIF92 ! lrst_oce = .FALSE.93 ! ENDIF94 ! IF( kstp == nitend .OR. indic < 0 ) THEN95 ! CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF96 ! ENDIF97 !#endif98 ! !99 ! IF( ln_timing .AND. kstp == nit000 ) CALL timing_reset100 !101 85 END SUBROUTINE stp_c1d 102 86 103 87 #else 104 !!---------------------------------------------------------------------- 105 !! Default key NO 1D Config 106 !!---------------------------------------------------------------------- 88 !!---------------------------------------------------------------------- 89 !! Default key NO 1D Config 90 !!---------------------------------------------------------------------- 107 91 CONTAINS 108 SUBROUTINE stp_c1d ( kt ) ! dummy routine 92 SUBROUTINE stp_c1d ( kt ) ! dummy routine 109 93 IMPLICIT NONE 110 94 INTEGER, INTENT( in ) :: kt … … 112 96 END SUBROUTINE stp_c1d 113 97 #endif 114 98 115 99 !!====================================================================== 116 100 END MODULE step_c1d -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/stpctl.F90
r11930 r12249 12 12 !! 3.7 ! 2016-09 (G. Madec) Remove solver 13 13 !! 4.0 ! 2017-04 (G. Madec) regroup global communications 14 !! 4.x ! 2019-10 (L. Brodeau) adapted for STATION_ASF test-case15 14 !!---------------------------------------------------------------------- 16 15 … … 18 17 !! stp_ctl : Control the run 19 18 !!---------------------------------------------------------------------- 20 !USE oce ! ocean dynamics and tracers variables21 19 USE dom_oce ! ocean space and time domain variables 22 !USE ice , ONLY : vt_i, u_ice, tm_i23 !24 20 USE sbc_oce ! surface fluxes and stuff 25 USE diawri 21 USE diawri ! Standard run outputs (dia_wri_state routine) 26 22 ! 27 23 USE in_out_manager ! I/O manager … … 42 38 !! Software governed by the CeCILL license (see ./LICENSE) 43 39 !!---------------------------------------------------------------------- 44 45 40 CONTAINS 46 41 47 SUBROUTINE stp_ctl( kt, kindic )42 SUBROUTINE stp_ctl( kt, Kbb, Kmm, kindic ) 48 43 !!---------------------------------------------------------------------- 49 44 !! *** ROUTINE stp_ctl *** … … 57 52 !! ** Actions : "time.step" file = last ocean time-step 58 53 !! "run.stat" file = run statistics 54 !! nstop indicator sheared among all local domain (lk_mpp=T) 59 55 !!---------------------------------------------------------------------- 60 56 INTEGER, INTENT(in ) :: kt ! ocean time-step index 57 INTEGER, INTENT(in ) :: Kbb, Kmm ! ocean time level index 61 58 INTEGER, INTENT(inout) :: kindic ! error indicator 62 59 !! … … 67 64 ! 68 65 ll_wrtstp = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 69 ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR.sn_cfctl%l_runstat )70 ll_wrtruns = ll_colruns 66 ll_colruns = ll_wrtstp .AND. ( sn_cfctl%l_runstat ) 67 ll_wrtruns = ll_colruns .AND. lwm 71 68 IF( kt == nit000 .AND. lwp ) THEN 72 69 WRITE(numout,*) … … 74 71 WRITE(numout,*) '~~~~~~~' 75 72 ! ! open time.step file 76 CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )73 IF( lwm ) CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 77 74 ! ! open run.stat file(s) at start whatever 78 75 ! ! the value of sn_cfctl%ptimincr 79 IF( l n_ctl .OR. sn_cfctl%l_runstat) THEN76 IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN 80 77 CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 81 78 clname = 'run.stat.nc' … … 91 88 IF( kt == nit000 ) lsomeoce = COUNT( ssmask(:,:) == 1._wp ) > 0 92 89 ! 93 IF(l l_wrtstp) THEN !== current time step ==! ("time.step" file)90 IF(lwm .AND. ll_wrtstp) THEN !== current time step ==! ("time.step" file) 94 91 WRITE ( numstp, '(1x, i8)' ) kt 95 92 REWIND( numstp ) … … 103 100 IF( ll_colruns ) THEN 104 101 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 102 nstop = NINT( zmax(3) ) ! nstop indicator sheared among all local domains 105 103 ENDIF 106 104 ! !== run statistics ==! ("run.stat" files) … … 114 112 END IF 115 113 ! !== error handling ==! 116 IF( ( ln_ctl .OR. lsomeoce ) .AND. ( & ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points114 IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. ( & ! domain contains some ocean points, check for sensible ranges 117 115 & zmax(1) > 5._wp .OR. & ! too large wind stress ( > 5 N/m^2 ) 118 116 & zmax(2) > 2000._wp .OR. & ! too large non-solar heat flux ( > 2000 W/m^2) … … 126 124 WRITE(ctmp6,*) ' ===> output of last computed fields in output.abort.nc file' 127 125 128 CALL dia_wri_state( 'output.abort' ) ! create an output.abort file126 CALL dia_wri_state( Kmm, 'output.abort' ) ! create an output.abort file 129 127 130 IF( .NOT. ln_ctl) THEN128 IF( .NOT. sn_cfctl%l_glochk ) THEN 131 129 WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea 132 130 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ' ', ctmp6, ' ' ) -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
r12199 r12249 15 15 !! usr_def_hgr : initialize the horizontal mesh 16 16 !!---------------------------------------------------------------------- 17 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain18 USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate !#LB???17 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain 18 USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate 19 19 USE par_oce ! ocean space and time domain 20 20 USE phycst ! physical constants
Note: See TracChangeset
for help on using the changeset viewer.