- Timestamp:
- 2020-05-15T19:41:01+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette@ HEADsette10 ^/utils/CI/sette@12931 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/launch_sasf.sh
r11996 r12939 2 2 3 3 # NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup: 4 NEMO_DIR="${HOME}/NEMO/NEMOvdev_r11085_ASINTER-05_Brodeau_Advanced_Bulk" 4 NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"` 5 6 echo "Using NEMO_DIR=${NEMO_DIR}" 7 8 # what directory inside "tests" actually contains the compiled test-case? 9 TC_DIR="STATION_ASF2" 10 11 # => so the executable to use is: 12 NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 5 13 6 14 # Directory where to run the simulation: … … 24 32 mkdir -p ${WORK_DIR} 25 33 26 NEMO_EXE="${NEMO_DIR}/tests/STATION_ASF/BLD/bin/nemo.exe" 34 27 35 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi 36 37 echo 38 echo " *** Using the following NEMO executable:" 39 echo " ${NEMO_EXE} " 40 echo 41 28 42 29 43 NEMO_EXPREF="${NEMO_DIR}/tests/STATION_ASF/EXPREF" … … 40 54 rsync -avP ${FORC_DIR}/Station_PAPA_50N-145W*.nc ${WORK_DIR}/ 41 55 42 for CASE in "ECMWF -noskin" "COARE3p6-noskin" "ECMWF" "COARE3p6" "NCAR"; do56 for CASE in "ECMWF" "COARE3p6" "NCAR" "ECMWF-noskin" "COARE3p6-noskin"; do 43 57 44 58 echo ; echo … … 56 70 echo 57 71 echo "Launching NEMO !" 58 ./nemo.exe 1> 72 ./nemo.exe 1>out_nemo.out 2>err_nemo.err 59 73 echo "Done!" 60 74 echo -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg
r12489 r12939 33 33 nn_time0 = 0 ! initial time of day in hhmm 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 ln_rstart = 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 ln_1st_euler = .false. ! =T force a start with forward time step (ln_rstart=T) 37 37 nn_rstctl = 2 ! restart control ==> activated only if ln_rstart=T 38 38 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg
r12489 r12939 33 33 nn_time0 = 0 ! initial time of day in hhmm 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 ln_rstart = 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 ln_1st_euler = .false. ! =T force a start with forward time step (ln_rstart=T) 37 37 nn_rstctl = 2 ! restart control ==> activated only if ln_rstart=T 38 38 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg
r12489 r12939 33 33 nn_time0 = 0 ! initial time of day in hhmm 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 ln_rstart = 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 ln_1st_euler = .false. ! =T force a start with forward time step (ln_rstart=T) 37 37 nn_rstctl = 2 ! restart control ==> activated only if ln_rstart=T 38 38 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg
r12489 r12939 33 33 nn_time0 = 0 ! initial time of day in hhmm 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 ln_rstart = 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 ln_1st_euler = .false. ! =T force a start with forward time step (ln_rstart=T) 37 37 nn_rstctl = 2 ! restart control ==> activated only if ln_rstart=T 38 38 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/namelist_ncar_cfg
r12489 r12939 33 33 nn_time0 = 0 ! initial time of day in hhmm 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 ln_rstart = 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 ln_1st_euler = .false. ! =T force a start with forward time step (ln_rstart=T) 37 37 nn_rstctl = 2 ! restart control ==> activated only if ln_rstart=T 38 38 ! ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/plot_station_asf.py
r12031 r12939 53 53 L_VARL = [ r'$Q_{lat}$', r'$Q_{sens}$' , r'$Q_{net}$' , r'$Q_{lw}$' , r'$|\tau|$' , r'$\Delta T_{skin}$' ] ; # name of variable in latex mode 54 54 L_VUNT = [ r'$W/m^2$' , r'$W/m^2$' , r'$W/m^2$' , r'$W/m^2$' , r'$N/m^2$' , 'K' ] 55 L_VMAX = [ 75. , 75. , 800. , 25. , 1.2 , -0.7 ]56 L_VMIN = [ -250. , -125. , -400. , -150. , 0. , 55 L_VMAX = [ 75. , 75. , 800. , 25. , 1.2 , 0.7 ] 56 L_VMIN = [ -250. , -125. , -400. , -150. , 0. , -0.7 ] 57 57 L_ANOM = [ True , True , True , True , True , False ] 58 58 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/diawri.F90
r12489 r12939 35 35 USE iom ! 36 36 USE ioipsl ! 37 37 38 #if defined key_si3 38 39 USE ice … … 56 57 57 58 !!---------------------------------------------------------------------- 58 !! NEMO/ SAS4.0 , NEMO Consortium (2018)59 !! $Id: diawri.F90 1 0425 2018-12-19 21:54:16Z smasson $59 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 60 !! $Id: diawri.F90 12493 2020-03-02 07:56:31Z smasson $ 60 61 !! Software governed by the CeCILL license (see ./LICENSE) 61 62 !!---------------------------------------------------------------------- … … 114 115 INTEGER, DIMENSION(2) :: ierr 115 116 !!---------------------------------------------------------------------- 116 ierr = 0 117 ALLOCATE( ndex_hT(jpi*jpj) , ndex_T(jpi*jpj*jpk) , & 118 & ndex_hU(jpi*jpj) , ndex_U(jpi*jpj*jpk) , & 119 & ndex_hV(jpi*jpj) , ndex_V(jpi*jpj*jpk) , STAT=ierr(1) ) 120 ! 121 dia_wri_alloc = MAXVAL(ierr) 122 CALL mpp_sum( 'diawri', dia_wri_alloc ) 117 IF( nn_write == -1 ) THEN 118 dia_wri_alloc = 0 119 ELSE 120 ierr = 0 121 ALLOCATE( ndex_hT(jpi*jpj) , ndex_T(jpi*jpj*jpk) , & 122 & ndex_hU(jpi*jpj) , ndex_U(jpi*jpj*jpk) , & 123 & ndex_hV(jpi*jpj) , ndex_V(jpi*jpj*jpk) , STAT=ierr(1) ) 124 ! 125 dia_wri_alloc = MAXVAL(ierr) 126 CALL mpp_sum( 'diawri', dia_wri_alloc ) 127 ! 128 ENDIF 123 129 ! 124 130 END FUNCTION dia_wri_alloc … … 374 380 CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm) ) ! now i-velocity 375 381 CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm) ) ! now j-velocity 376 382 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 377 383 CALL iom_rstput( 0, 0, inum, 'sowaflup', emp - rnf ) ! freshwater budget 378 384 CALL iom_rstput( 0, 0, inum, 'sohefldo', qsr + qns ) ! total heat flux -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/nemogcm.F90
r12254 r12939 2 2 !!====================================================================== 3 3 !! *** MODULE nemogcm *** 4 !! StandAlone Surface module : surface fluxes4 !! STATION_ASF (SAS meets C1D) 5 5 !!====================================================================== 6 6 !! History : 3.6 ! 2011-11 (S. Alderson, G. Madec) original code … … 19 19 !!---------------------------------------------------------------------- 20 20 USE step_oce ! module used in the ocean time stepping module (step.F90) 21 USE sbc_oce ! surface boundary condition: ocean #LB: rm?22 21 USE phycst ! physical constant (par_cst routine) 23 22 USE domain ! domain initialization (dom_init & dom_cfg routines) 24 23 USE closea ! treatment of closed seas (for ln_closea) 25 24 USE usrdef_nam ! user defined configuration 25 USE istate ! initial state setting (istate_init routine) 26 26 USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices 27 27 USE daymod ! calendar 28 28 USE restart ! open restart file 29 !LB:USE step ! NEMO time-stepping (stp routine)30 29 USE c1d ! 1D configuration 31 30 USE step_c1d ! Time stepping loop for the 1D configuration 32 USE sbcssm !33 31 ! 32 USE in_out_manager ! I/O manager 34 33 USE lib_mpp ! distributed memory computing 35 34 USE mppini ! shared/distributed memory setting (mpp_init routine) … … 49 48 !!---------------------------------------------------------------------- 50 49 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 51 !! $Id: nemogcm.F90 1 1536 2019-09-11 13:54:18Z smasson$50 !! $Id: nemogcm.F90 12489 2020-02-28 15:55:11Z davestorkey $ 52 51 !! Software governed by the CeCILL license (see ./LICENSE) 53 52 !!---------------------------------------------------------------------- … … 84 83 ! !== time stepping ==! 85 84 ! !-----------------------! 85 ! 86 ! !== set the model time-step ==! 87 ! 86 88 istp = nit000 87 89 ! … … 106 108 ! 107 109 #if defined key_iomput 108 CALL xios_finalize ! end mpp communications with xios110 CALL xios_finalize ! end mpp communications with xios 109 111 #else 110 IF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications 111 ENDIF 112 IF( lk_mpp ) CALL mppstop ! end mpp communications 112 113 #endif 113 114 ! … … 161 162 IF( lwm ) CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 162 163 ! open reference and configuration namelist files 163 CALL load_nml( numnam_ref, 'namelist_ref', -1, lwm )164 CALL load_nml( numnam_cfg, 'namelist_cfg', -1, lwm )164 CALL load_nml( numnam_ref, 'namelist_ref', -1, lwm ) 165 CALL load_nml( numnam_cfg, 'namelist_cfg', -1, lwm ) 165 166 IF( lwm ) CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 166 167 ! open /dev/null file to be able to supress output write easily 167 CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 168 IF( Agrif_Root() ) THEN 169 CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 170 #ifdef key_agrif 171 ELSE 172 numnul = Agrif_Parent(numnul) 173 #endif 174 ENDIF 168 175 ! 169 176 ! !--------------------! … … 177 184 ! 178 185 ! finalize the definition of namctl variables 179 IF( sn_cfctl%l_allon ) THEN 180 ! Turn on all options. 181 CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. ) 182 ! Ensure all processors are active 183 sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1 184 ELSEIF( sn_cfctl%l_config ) THEN 185 ! Activate finer control of report outputs 186 ! optionally switch off output from selected areas (note this only 187 ! applies to output which does not involve global communications) 188 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. & 189 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) & 190 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 191 ELSE 192 ! turn off all options. 193 CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. ) 194 ENDIF 186 IF( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax .OR. MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) & 187 & CALL nemo_set_cfctl( sn_cfctl, .FALSE. ) 195 188 ! 196 189 lwp = (narea == 1) .OR. sn_cfctl%l_oceout ! control of all listing output print … … 235 228 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 236 229 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 237 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 230 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 238 231 ! 239 232 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file … … 266 259 IF( ln_timing ) CALL timing_start( 'nemo_init') 267 260 ! 268 CALL phy_cst ! Physical constants269 CALL eos_init ! Equation of state261 CALL phy_cst ! Physical constants 262 CALL eos_init ! Equation of state 270 263 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 271 CALL dom_init( Nbb, Nnn, Naa, "OPA") ! Domain264 CALL dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 272 265 IF( sn_cfctl%l_prtctl ) & 273 266 & CALL prt_ctl_init ! Print control 274 275 IF( ln_rstart ) THEN ! Restart from a file 276 ! ! ------------------- 277 CALL rst_read( Nbb, Nnn ) ! Read the restart file 278 CALL day_init ! model calendar (using both namelist and restart infos) 279 ! 280 ELSE ! Start from rest 281 ! ! --------------- 282 numror = 0 ! define numror = 0 -> no restart file to read 283 neuler = 0 ! Set time-step indicator at nit000 (euler forward) 284 CALL day_init ! model calendar (using both namelist and restart infos) 285 ENDIF 286 ! 287 288 ! ! external forcing 289 CALL sbc_init( Nbb, Nnn, Naa ) ! surface boundary conditions (including sea-ice) 267 ! 268 269 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) 270 271 ! ! external forcing 272 CALL sbc_init( Nbb, Nnn, Naa ) ! surface boundary conditions (including sea-ice) 290 273 291 274 ! … … 311 294 WRITE(numout,*) '~~~~~~~~' 312 295 WRITE(numout,*) ' Namelist namctl' 313 WRITE(numout,*) ' sn_cfctl%l_glochk = ', sn_cfctl%l_glochk314 WRITE(numout,*) ' sn_cfctl%l_allon = ', sn_cfctl%l_allon315 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config316 296 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 317 297 WRITE(numout,*) ' sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat … … 321 301 WRITE(numout,*) ' sn_cfctl%l_prttrc = ', sn_cfctl%l_prttrc 322 302 WRITE(numout,*) ' sn_cfctl%l_oasout = ', sn_cfctl%l_oasout 323 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 324 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax 325 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 326 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 303 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 304 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax 305 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 306 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 327 307 WRITE(numout,*) ' level of print nn_print = ', nn_print 328 308 WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls … … 439 419 !!---------------------------------------------------------------------- 440 420 ! 441 ierr = oce_alloc () ! ocean 421 ierr = oce_alloc () ! ocean 442 422 ierr = ierr + dia_wri_alloc() 443 423 ierr = ierr + dom_oce_alloc() ! ocean domain … … 448 428 END SUBROUTINE nemo_alloc 449 429 450 451 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto , for_all)430 431 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto ) 452 432 !!---------------------------------------------------------------------- 453 433 !! *** ROUTINE nemo_set_cfctl *** 454 434 !! 455 435 !! ** Purpose : Set elements of the output control structure to setto. 456 !! for_all should be .false. unless all areas are to be457 !! treated identically.458 436 !! 459 437 !! ** Method : Note this routine can be used to switch on/off some 460 !! types of output for selected areas but any output types 461 !! that involve global communications (e.g. mpp_max, glob_sum) 462 !! should be protected from selective switching by the 463 !! for_all argument 464 !!---------------------------------------------------------------------- 465 LOGICAL :: setto, for_all 466 TYPE(sn_ctl) :: sn_cfctl 467 !!---------------------------------------------------------------------- 468 IF( for_all ) THEN 469 sn_cfctl%l_runstat = setto 470 sn_cfctl%l_trcstat = setto 471 ENDIF 438 !! types of output for selected areas. 439 !!---------------------------------------------------------------------- 440 TYPE(sn_ctl), INTENT(inout) :: sn_cfctl 441 LOGICAL , INTENT(in ) :: setto 442 !!---------------------------------------------------------------------- 443 sn_cfctl%l_runstat = setto 444 sn_cfctl%l_trcstat = setto 472 445 sn_cfctl%l_oceout = setto 473 446 sn_cfctl%l_layout = setto … … 479 452 !!====================================================================== 480 453 END MODULE nemogcm 454 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/sbcssm.F90
r12249 r12939 54 54 !!---------------------------------------------------------------------- 55 55 !! NEMO/SAS 4.0 , NEMO Consortium (2018) 56 !! $Id: sbcssm.F90 1 0068 2018-08-28 14:09:04Z nicolasmartin$56 !! $Id: sbcssm.F90 12615 2020-03-26 15:18:49Z laurent $ 57 57 !! Software governed by the CeCILL license (see ./LICENSE) 58 58 !!---------------------------------------------------------------------- -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/step_c1d.F90
r12249 r12939 26 26 !!---------------------------------------------------------------------- 27 27 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 28 !! $Id: step_c1d.F90 1 0068 2018-08-28 14:09:04Z nicolasmartin$28 !! $Id: step_c1d.F90 12377 2020-02-12 14:39:06Z acc $ 29 29 !! Software governed by the CeCILL license (see ./LICENSE) 30 30 !!---------------------------------------------------------------------- … … 64 64 CALL sbc ( kstp, Nbb, Nnn ) ! Sea Boundary Condition (including sea-ice) 65 65 66 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 67 ! diagnostics and outputs 68 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 66 69 CALL dia_wri( kstp, Nnn ) ! ocean model: outputs 67 70 … … 75 78 ! Control and restarts 76 79 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 77 CALL stp_ctl( kstp, Nbb, Nnn, indic ) 80 CALL stp_ctl( kstp, Nnn ) 81 78 82 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 79 83 IF( lrst_oce ) CALL rst_write( kstp, Nbb, Nnn ) ! write output ocean restart file 80 84 ! 81 85 #if defined key_iomput 82 IF( kstp == nitend .OR. indic <0 ) CALL xios_context_finalize() ! needed for XIOS86 IF( kstp == nitend .OR. nstop > 0 ) CALL xios_context_finalize() ! needed for XIOS 83 87 ! 84 88 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/stpctl.F90
r12254 r12939 19 19 USE dom_oce ! ocean space and time domain variables 20 20 USE sbc_oce ! surface fluxes and stuff 21 ! 21 22 USE diawri ! Standard run outputs (dia_wri_state routine) 22 !23 23 USE in_out_manager ! I/O manager 24 24 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 25 25 USE lib_mpp ! distributed memory computing 26 26 ! 27 27 USE netcdf ! NetCDF library 28 28 IMPLICIT NONE … … 31 31 PUBLIC stp_ctl ! routine called by step.F90 32 32 33 INTEGER :: idrun, idtime, idtau, idqns, idemp, istatus34 LOGICAL :: lsomeoce33 INTEGER :: nrunid ! netcdf file id 34 INTEGER, DIMENSION(3) :: nvarid ! netcdf variable id 35 35 !!---------------------------------------------------------------------- 36 36 !! NEMO/SAS 4.0 , NEMO Consortium (2018) … … 40 40 CONTAINS 41 41 42 SUBROUTINE stp_ctl( kt, K bb, Kmm, kindic)42 SUBROUTINE stp_ctl( kt, Kmm ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE stp_ctl *** 45 !! 45 !! 46 46 !! ** Purpose : Control the run 47 47 !! 48 48 !! ** Method : - Save the time step in numstp 49 49 !! - Print it each 50 time steps 50 !! - Stop the run IF problem encountered by setting indic=-3 50 !! - Stop the run IF problem encountered by setting nstop > 0 51 !! Problems checked: wind stress module max larger than 5 N/m^2 52 !! non-solar heat flux max larger than 2000 W/m^2 53 !! Evaporation-Precip max larger than 1.E-3 kg/m^2/s 51 54 !! 52 55 !! ** Actions : "time.step" file = last ocean time-step 53 56 !! "run.stat" file = run statistics 54 !! nstop indicator sheared among all local domain (lk_mpp=T)57 !! nstop indicator sheared among all local domain 55 58 !!---------------------------------------------------------------------- 56 59 INTEGER, INTENT(in ) :: kt ! ocean time-step index 57 INTEGER, INTENT(in ) :: Kbb, Kmm ! ocean time level index 58 INTEGER, INTENT(inout) :: kindic ! error indicator 59 !! 60 REAL(wp), DIMENSION(3) :: zmax 61 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 62 CHARACTER(len=20) :: clname 63 !!---------------------------------------------------------------------- 64 ! 65 ll_wrtstp = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 66 ll_colruns = ll_wrtstp .AND. ( sn_cfctl%l_runstat ) 67 ll_wrtruns = ll_colruns .AND. lwm 68 IF( kt == nit000 .AND. lwp ) THEN 69 WRITE(numout,*) 70 WRITE(numout,*) 'stp_ctl : time-stepping control' 71 WRITE(numout,*) '~~~~~~~' 72 ! ! open time.step file 73 IF( lwm ) CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 74 ! ! open run.stat file(s) at start whatever 75 ! ! the value of sn_cfctl%ptimincr 76 IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN 60 INTEGER, INTENT(in ) :: Kmm ! ocean time level index 61 !! 62 INTEGER :: ji ! dummy loop indices 63 INTEGER :: idtime, istatus 64 INTEGER , DIMENSION(4) :: iareasum, iareamin, iareamax 65 INTEGER , DIMENSION(3,3) :: iloc ! min/max loc indices 66 REAL(wp) :: zzz ! local real 67 REAL(wp), DIMENSION(4) :: zmax, zmaxlocal 68 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 69 LOGICAL, DIMENSION(jpi,jpj) :: llmsk 70 CHARACTER(len=20) :: clname 71 !!---------------------------------------------------------------------- 72 IF( nstop > 0 .AND. ngrdstop > -1 ) RETURN ! stpctl was already called by a child grid 73 ! 74 ll_wrtstp = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 75 ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1 76 ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 77 ! 78 IF( kt == nit000 ) THEN 79 ! 80 IF( lwp ) THEN 81 WRITE(numout,*) 82 WRITE(numout,*) 'stp_ctl : time-stepping control' 83 WRITE(numout,*) '~~~~~~~' 84 ENDIF 85 ! ! open time.step ascii file, done only by 1st subdomain 86 IF( lwm ) CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 87 ! 88 IF( ll_wrtruns ) THEN 89 ! ! open run.stat ascii file, done only by 1st subdomain 77 90 CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 91 ! ! open run.stat.nc netcdf file, done only by 1st subdomain 78 92 clname = 'run.stat.nc' 79 93 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 80 istatus = NF90_CREATE( TRIM(clname), NF90_CLOBBER, idrun ) 81 istatus = NF90_DEF_DIM( idrun, 'time', NF90_UNLIMITED, idtime ) 82 istatus = NF90_DEF_VAR( idrun, 'tau_max', NF90_DOUBLE, (/ idtime /), idtau ) 83 istatus = NF90_DEF_VAR( idrun, 'qns_max', NF90_DOUBLE, (/ idtime /), idqns ) 84 istatus = NF90_DEF_VAR( idrun, 'emp_max', NF90_DOUBLE, (/ idtime /), idemp ) 85 istatus = NF90_ENDDEF(idrun) 86 ENDIF 87 ENDIF 88 IF( kt == nit000 ) lsomeoce = COUNT( ssmask(:,:) == 1._wp ) > 0 89 ! 90 IF(lwm .AND. ll_wrtstp) THEN !== current time step ==! ("time.step" file) 94 istatus = NF90_CREATE( TRIM(clname), NF90_CLOBBER, nrunid ) 95 istatus = NF90_DEF_DIM( nrunid, 'time', NF90_UNLIMITED, idtime ) 96 istatus = NF90_DEF_VAR( nrunid, 'tau_max', NF90_DOUBLE, (/ idtime /), nvarid(1) ) 97 istatus = NF90_DEF_VAR( nrunid, 'qns_max', NF90_DOUBLE, (/ idtime /), nvarid(2) ) 98 istatus = NF90_DEF_VAR( nrunid, 'emp_max', NF90_DOUBLE, (/ idtime /), nvarid(3) ) 99 istatus = NF90_ENDDEF(nrunid) 100 ENDIF 101 ! 102 ENDIF 103 ! 104 ! !== write current time step ==! 105 ! !== done only by 1st subdomain at writting timestep ==! 106 IF( lwm .AND. ll_wrtstp ) THEN 91 107 WRITE ( numstp, '(1x, i8)' ) kt 92 108 REWIND( numstp ) 93 109 ENDIF 94 ! 95 ! !== test of extrema ==! 96 zmax(1) = MAXVAL( taum(:,:) , mask = tmask(:,:,1) == 1._wp ) ! max wind stress module 97 zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = tmask(:,:,1) == 1._wp ) ! max non-solar heat flux 98 zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = tmask(:,:,1) == 1._wp ) ! max E-P 99 ! 110 ! !== test of local extrema ==! 111 ! !== done by all processes at every time step ==! 112 llmsk(:,:) = tmask(:,:,1) == 1._wp 113 zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module 114 zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk ) ! max non-solar heat flux 115 zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk ) ! max E-P 116 zmax(4) = REAL( nstop, wp ) ! stop indicator 117 ! !== get global extrema ==! 118 ! !== done by all processes if writting run.stat ==! 100 119 IF( ll_colruns ) THEN 120 zmaxlocal(:) = zmax(:) 101 121 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 102 nstop = NINT( zmax(3) ) ! nstop indicator sheared among all local domains 103 ENDIF 104 ! !== run statistics ==! ("run.stat" files) 122 nstop = NINT( zmax(4) ) ! update nstop indicator (now sheared among all local domains) 123 ENDIF 124 ! !== write "run.stat" files ==! 125 ! !== done only by 1st subdomain at writting timestep ==! 105 126 IF( ll_wrtruns ) THEN 106 127 WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 107 istatus = NF90_PUT_VAR( idrun, idtau, (/ zmax(1)/), (/kt/), (/1/) ) 108 istatus = NF90_PUT_VAR( idrun, idqns, (/ zmax(2)/), (/kt/), (/1/) ) 109 istatus = NF90_PUT_VAR( idrun, idemp, (/ zmax(3)/), (/kt/), (/1/) ) 110 IF( MOD( kt , 100 ) == 0 ) istatus = NF90_SYNC(idrun) 111 IF( kt == nitend ) istatus = NF90_CLOSE(idrun) 128 istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) ) 129 istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) ) 130 istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/ zmax(3)/), (/kt/), (/1/) ) 131 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 112 132 END IF 113 ! !== error handling ==! 114 IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. ( & ! domain contains some ocean points, check for sensible ranges 115 & zmax(1) > 5._wp .OR. & ! too large wind stress ( > 5 N/m^2 ) 116 & zmax(2) > 2000._wp .OR. & ! too large non-solar heat flux ( > 2000 W/m^2) 117 & zmax(3) > 1.E-3_wp .OR. & ! too large net freshwater flux ( kg/m^2/s) 118 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) ) ) THEN ! NaN encounter in the tests 119 120 !! We are 1D so no need to find a spatial location of the rogue point. 121 133 ! !== error handling ==! 134 ! !== done by all processes at every time step ==! 135 ! 136 IF( zmax(1) > 5._wp .OR. & ! too large wind stress ( > 5 N/m^2 ) 137 & zmax(2) > 2000._wp .OR. & ! too large non-solar heat flux ( > 2000 W/m^2 ) 138 & zmax(3) > 1.E-3_wp .OR. & ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 139 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR. & ! NaN encounter in the tests 140 & ABS( zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN ! Infinity encounter in the tests 141 ! 142 iloc(:,:) = 0 143 IF( ll_colruns ) THEN ! zmax is global, so it is the same on all subdomains -> no dead lock with mpp_maxloc 144 ! first: close the netcdf file, so we can read it 145 IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid) 146 ! get global loc on the min/max 147 CALL mpp_maxloc( 'stpctl', taum(:,:) , tmask(:,:,1), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F 148 CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), tmask(:,:,1), zzz, iloc(1:2,2) ) 149 CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), tmask(:,:,1), zzz, iloc(1:2,3) ) 150 ! find which subdomain has the max. 151 iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0 152 DO ji = 1, 4 153 IF( zmaxlocal(ji) == zmax(ji) ) THEN 154 iareamin(ji) = narea ; iareamax(ji) = narea ; iareasum(ji) = 1 155 ENDIF 156 END DO 157 CALL mpp_min( "stpctl", iareamin ) ! min over the global domain 158 CALL mpp_max( "stpctl", iareamax ) ! max over the global domain 159 CALL mpp_sum( "stpctl", iareasum ) ! sum over the global domain 160 ELSE ! find local min and max locations: 161 ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 162 iloc(1:2,1) = MAXLOC( taum(:,:) , mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 163 iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 164 iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) + (/ nimpp - 1, njmpp - 1/) 165 iareamin(:) = narea ; iareamax(:) = narea ; iareasum(:) = 1 ! this is local information 166 ENDIF 167 ! 122 168 WRITE(ctmp1,*) ' stp_ctl: |tau_mod| > 5 N/m2 or |qns| > 2000 W/m2 or |emp| > 1.E-3 or NaN encounter in the tests' 123 WRITE(ctmp2,9500) kt, zmax(1), zmax(2), zmax(3) 124 WRITE(ctmp6,*) ' ===> output of last computed fields in output.abort.nc file' 125 169 CALL wrt_line( ctmp2, kt, '|tau| max', zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 170 CALL wrt_line( ctmp3, kt, '|qns| max', zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 171 CALL wrt_line( ctmp4, kt, 'emp max', zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) ) 172 IF( Agrif_Root() ) THEN 173 WRITE(ctmp6,*) ' ===> output of last computed fields in output.abort* files' 174 ELSE 175 WRITE(ctmp6,*) ' ===> output of last computed fields in '//TRIM(Agrif_CFixed())//'_output.abort* files' 176 ENDIF 177 ! 126 178 CALL dia_wri_state( Kmm, 'output.abort' ) ! create an output.abort file 127 128 IF( .NOT. sn_cfctl%l_glochk ) THEN129 WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea130 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ' ', ctmp6, ' ' )131 ELSE132 CALL ctl_stop( ctmp1, ' ', ctmp2, ' ', ctmp6, ' ' )133 ENDIF134 135 kindic = -3179 ! 180 IF( ll_colruns .or. jpnij == 1 ) THEN ! all processes synchronized -> use lwp to print in opened ocean.output files 181 IF(lwp) CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 182 ELSE ! only mpi subdomains with errors are here -> STOP now 183 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 184 ENDIF 185 ! 186 IF( nstop == 0 ) nstop = 1 187 ngrdstop = Agrif_Fixed() 136 188 ! 137 189 ENDIF … … 140 192 ! 141 193 END SUBROUTINE stp_ctl 194 195 196 SUBROUTINE wrt_line( cdline, kt, cdprefix, pval, kloc, ksum, kmin, kmax ) 197 !!---------------------------------------------------------------------- 198 !! *** ROUTINE wrt_line *** 199 !! 200 !! ** Purpose : write information line 201 !! 202 !!---------------------------------------------------------------------- 203 CHARACTER(len=*), INTENT( out) :: cdline 204 CHARACTER(len=*), INTENT(in ) :: cdprefix 205 REAL(wp), INTENT(in ) :: pval 206 INTEGER, DIMENSION(3), INTENT(in ) :: kloc 207 INTEGER, INTENT(in ) :: kt, ksum, kmin, kmax 208 ! 209 CHARACTER(len=80) :: clsuff 210 CHARACTER(len=9 ) :: clkt, clsum, clmin, clmax 211 CHARACTER(len=9 ) :: cli, clj, clk 212 CHARACTER(len=1 ) :: clfmt 213 CHARACTER(len=4 ) :: cl4 ! needed to be able to compile with Agrif, I don't know why 214 INTEGER :: ifmtk 215 !!---------------------------------------------------------------------- 216 WRITE(clkt , '(i9)') kt 217 218 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij ,wp))) + 1 ! how many digits to we need to write ? (we decide max = 9) 219 !!! WRITE(clsum, '(i'//clfmt//')') ksum ! this is creating a compilation error with AGRIF 220 cl4 = '(i'//clfmt//')' ; WRITE(clsum, cl4) ksum 221 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij-1,wp))) + 1 ! how many digits to we need to write ? (we decide max = 9) 222 cl4 = '(i'//clfmt//')' ; WRITE(clmin, cl4) kmin-1 223 WRITE(clmax, cl4) kmax-1 224 ! 225 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpiglo,wp))) + 1 ! how many digits to we need to write jpiglo? (we decide max = 9) 226 cl4 = '(i'//clfmt//')' ; WRITE(cli, cl4) kloc(1) ! this is ok with AGRIF 227 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpjglo,wp))) + 1 ! how many digits to we need to write jpjglo? (we decide max = 9) 228 cl4 = '(i'//clfmt//')' ; WRITE(clj, cl4) kloc(2) ! this is ok with AGRIF 229 ! 230 IF( ksum == 1 ) THEN ; WRITE(clsuff,9100) TRIM(clmin) 231 ELSE ; WRITE(clsuff,9200) TRIM(clsum), TRIM(clmin), TRIM(clmax) 232 ENDIF 233 IF(kloc(3) == 0) THEN 234 ifmtk = INT(LOG10(REAL(jpk,wp))) + 1 ! how many digits to we need to write jpk? (we decide max = 9) 235 clk = REPEAT(' ', ifmtk) ! create the equivalent in blank string 236 WRITE(cdline,9300) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj), clk(1:ifmtk), TRIM(clsuff) 237 ELSE 238 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpk,wp))) + 1 ! how many digits to we need to write jpk? (we decide max = 9) 239 !!! WRITE(clk, '(i'//clfmt//')') kloc(3) ! this is creating a compilation error with AGRIF 240 cl4 = '(i'//clfmt//')' ; WRITE(clk, cl4) kloc(3) ! this is ok with AGRIF 241 WRITE(cdline,9400) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj), TRIM(clk), TRIM(clsuff) 242 ENDIF 243 ! 244 9100 FORMAT('MPI rank ', a) 245 9200 FORMAT('found in ', a, ' MPI tasks, spread out among ranks ', a, ' to ', a) 246 9300 FORMAT('kt ', a, ' ', a, ' ', 1pg11.4, ' at i j ', a, ' ', a, ' ', a, ' ', a) 247 9400 FORMAT('kt ', a, ' ', a, ' ', 1pg11.4, ' at i j k ', a, ' ', a, ' ', a, ' ', a) 248 ! 249 END SUBROUTINE wrt_line 250 142 251 143 252 !!====================================================================== -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/usrdef_hgr.F90
r11930 r12939 14 14 !! usr_def_hgr : initialize the horizontal mesh 15 15 !!---------------------------------------------------------------------- 16 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain17 16 USE c1d , ONLY: rn_lon1d, rn_lat1d ! ocean lon/lat define by namelist 18 17 USE par_oce ! ocean space and time domain … … 30 29 !!---------------------------------------------------------------------- 31 30 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 32 !! $Id: usrdef_hgr.F90 1 0072 2018-08-28 15:21:50Z nicolasmartin $31 !! $Id: usrdef_hgr.F90 12489 2020-02-28 15:55:11Z davestorkey $ 33 32 !! Software governed by the CeCILL license (see ./LICENSE) 34 33 !!---------------------------------------------------------------------- … … 54 53 !! 55 54 !! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees) 56 !! - define coriolis parameter at f-point if the domain in not on the sphere 55 !! - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) 57 56 !! - define i- & j-scale factors at t-, u-, v- and f-points (in meters) 58 57 !! - define u- & v-surfaces (if gridsize reduction is used in some straits) (in m2) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
r12249 r12939 8 8 !!====================================================================== 9 9 !! History : 4.0 ! 2016-03 (S. Flavoni, G. Madec) Original code 10 !! History :4.x ! 2019-10 (L. Brodeau) for STATION_ASF (C1D meets SAS)10 !! 4.x ! 2019-10 (L. Brodeau) for STATION_ASF (C1D meets SAS) 11 11 !!---------------------------------------------------------------------- 12 12 … … 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 coordinate19 17 USE par_oce ! ocean space and time domain 20 18 USE phycst ! physical constants … … 33 31 !!---------------------------------------------------------------------- 34 32 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 35 !! $Id: usrdef_nam.F90 1 1536 2019-09-11 13:54:18Z smasson$33 !! $Id: usrdef_nam.F90 12377 2020-02-12 14:39:06Z acc $ 36 34 !! Software governed by the CeCILL license (see ./LICENSE) 37 35 !!---------------------------------------------------------------------- … … 68 66 kk_cfg = 0 69 67 70 ! Global Domain size: STATION_ASF domain is 3 x 3 grid-points x 75or vertical levels68 ! Global Domain size: STATION_ASF domain is 3 x 3 grid-points x 2 or vertical levels 71 69 kpi = 3 72 70 kpj = 3 73 kpk = 171 kpk = 2 ! 2, rather than 1, because 1 would cause some issues... like overflow in array boundary indexes, etc... 74 72 ! 75 73 ! ! Set the lateral boundary condition of the global domain -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/usrdef_zgr.F90
r12038 r12939 1 1 MODULE usrdef_zgr 2 2 !!====================================================================== 3 !! *** MODULEusrdef_zgr ***3 !! *** MODULE usrdef_zgr *** 4 4 !! 5 5 !! === STATION_ASF case === 6 6 !! 7 !! user defined :vertical coordinate system of a user configuration7 !! User defined : vertical coordinate system of a user configuration 8 8 !!====================================================================== 9 !! History : 4.0 ! 2019-10 (L. Brodeau) Original code 9 !! History : 4.0 ! 2016-06 (G. Madec) Original code 10 !! 4.x ! 2019-10 (L. Brodeau) Station ASF 10 11 !!---------------------------------------------------------------------- 11 12 12 13 !!---------------------------------------------------------------------- 13 !! usr_def_zgr : user defined vertical coordinate system (required) 14 !! usr_def_zgr : user defined vertical coordinate system 15 !! zgr_z : reference 1D z-coordinate 16 !! zgr_top_bot: ocean top and bottom level indices 17 !! zgr_zco : 3D verticl coordinate in pure z-coordinate case 14 18 !!--------------------------------------------------------------------- 15 19 USE oce ! ocean variables 16 !USE dom_oce ! ocean domain17 !USE depth_e3 ! depth <=> e318 20 USE usrdef_nam ! User defined : namelist variables 19 21 ! … … 21 23 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 22 24 USE lib_mpp ! distributed memory computing library 23 USE timing ! Timing24 25 25 26 IMPLICIT NONE 26 27 PRIVATE 27 28 28 PUBLIC usr_def_zgr ! called by domzgr.F9029 PUBLIC usr_def_zgr ! called by domzgr.F90 29 30 30 31 !!---------------------------------------------------------------------- 31 32 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 32 !! $Id: usrdef_zgr.F90 1 0072 2018-08-28 15:21:50Z nicolasmartin$33 !! $Id: usrdef_zgr.F90 12377 2020-02-12 14:39:06Z acc $ 33 34 !! Software governed by the CeCILL license (see ./LICENSE) 34 35 !!---------------------------------------------------------------------- … … 47 48 !! 48 49 !!---------------------------------------------------------------------- 49 LOGICAL , INTENT( out) :: ld_zco, ld_zps, ld_sco ! vertical coordinate flags ( read in namusr_def )50 LOGICAL , INTENT( 51 REAL(wp), DIMENSION(:) , INTENT( 52 REAL(wp), DIMENSION(:) , INTENT( 53 REAL(wp), DIMENSION(:,:,:), INTENT( 54 REAL(wp), DIMENSION(:,:,:), INTENT( 55 REAL(wp), DIMENSION(:,:,:), INTENT( out) :: pe3w , pe3uw, pe3vw ! i-scale factors56 INTEGER , DIMENSION(:,:) , INTENT( 50 LOGICAL , INTENT(out) :: ld_zco, ld_zps, ld_sco ! vertical coordinate flags 51 LOGICAL , INTENT(out) :: ld_isfcav ! under iceshelf cavity flag 52 REAL(wp), DIMENSION(:) , INTENT(out) :: pdept_1d, pdepw_1d ! 1D grid-point depth [m] 53 REAL(wp), DIMENSION(:) , INTENT(out) :: pe3t_1d , pe3w_1d ! 1D grid-point depth [m] 54 REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pdept, pdepw ! grid-point depth [m] 55 REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pe3t , pe3u , pe3v , pe3f ! vertical scale factors [m] 56 REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pe3w , pe3uw, pe3vw ! i-scale factors 57 INTEGER , DIMENSION(:,:) , INTENT(out) :: k_top, k_bot ! first & last ocean level 57 58 !!---------------------------------------------------------------------- 58 59 ! … … 61 62 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 62 63 ! 63 64 ! 65 ! type of vertical coordinate 66 ! --------------------------- 64 67 ld_zco = .TRUE. ! z-coordinate without ocean cavities 65 68 ld_zps = .FALSE. 66 69 ld_sco = .FALSE. 67 70 ld_isfcav = .FALSE. 68 71 72 !! 1st level (the only one that matters) 69 73 pdept_1d(1) = rn_dept1 ! depth (m) at which the SST is taken/measured == depth of first T point! 70 74 pdepw_1d(1) = 0._wp … … 72 76 pe3w_1d(1) = rn_dept1 ! LB??? 73 77 74 pdept(:,:,:) = rn_dept1 75 pdepw(:,:,:) = 0._wp 76 pe3t(:,:,:) = 2._wp*rn_dept1 77 pe3u(:,:,:) = 2._wp*rn_dept1 78 pe3v(:,:,:) = 2._wp*rn_dept1 79 pe3f(:,:,:) = 2._wp*rn_dept1 80 pe3w(:,:,:) = rn_dept1 ! LB??? 81 pe3uw(:,:,:) = rn_dept1 ! LB??? 82 pe3vw(:,:,:) = rn_dept1 ! LB??? 78 pdept(:,:,1) = rn_dept1 79 pdepw(:,:,1) = 0._wp 80 pe3t(:,:,1) = 2._wp*rn_dept1 81 pe3u(:,:,1) = 2._wp*rn_dept1 82 pe3v(:,:,1) = 2._wp*rn_dept1 83 pe3f(:,:,1) = 2._wp*rn_dept1 84 pe3w(:,:,1) = rn_dept1 ! LB??? 85 pe3uw(:,:,1) = rn_dept1 ! LB??? 86 pe3vw(:,:,1) = rn_dept1 ! LB??? 87 88 !! 2nd level, technically useless (only for the sake of code stability) 89 pdept_1d(2) = 3._wp*rn_dept1 90 pdepw_1d(2) = 2._wp*rn_dept1 91 pe3t_1d(2) = 2._wp*rn_dept1 92 pe3w_1d(2) = 2._wp*rn_dept1 93 94 pdept(:,:,2) = 3._wp*rn_dept1 95 pdepw(:,:,2) = 2._wp*rn_dept1 96 pe3t(:,:,2) = 2._wp*rn_dept1 97 pe3u(:,:,2) = 2._wp*rn_dept1 98 pe3v(:,:,2) = 2._wp*rn_dept1 99 pe3f(:,:,2) = 2._wp*rn_dept1 100 pe3w(:,:,2) = 2._wp*rn_dept1 101 pe3uw(:,:,2) = 2._wp*rn_dept1 102 pe3vw(:,:,2) = 2._wp*rn_dept1 103 83 104 k_top = 1 84 105 k_bot = 1 85 ! 106 86 107 END SUBROUTINE usr_def_zgr 87 108 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.