Changeset 6108
- Timestamp:
- 2015-12-17T19:21:15+01:00 (8 years ago)
- Location:
- branches/2015/dev_merge_2015/NEMOGCM
- Files:
-
- 3 added
- 9 deleted
- 85 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm
r5656 r6108 17 17 18 18 19 %NCDF_INC -I$ NETCDF/include20 %NCDF_LIB -L$ NETCDF/lib -lnetcdf -lnetcdff19 %NCDF_INC -I${NETCDF}/include 20 %NCDF_LIB -L${NETCDF}/lib -lnetcdf -lnetcdff 21 21 %CPP cpp 22 22 %FC mpiifort -
branches/2015/dev_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm
r5656 r6108 34 34 35 35 # required modules 36 # module load INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel36 # module load INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel_shared NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel_shared 37 37 38 38 # Environment variables set by user. Others should automatically define when loading modules. 39 # export XIOS=/users/home/models/nemo/xios 39 #export XIOS=/users/home/models/nemo/xios 40 #export HDF5=/users/home/opt/hdf5/hdf5-1.8.11_parallel_shared 41 #export NETCDF=/users/home/opt/netcdf/netcdf-4.3_parallel_shared 40 42 41 %NCDF_INC -I$ NETCDF/include -I$PNETCDF/include42 %NCDF_LIB -L$ NETCDF/lib -lnetcdff -lnetcdf -L$PNETCDF/lib -lpnetcdf43 %HDF5_INC -I$ PHDF5/include44 %HDF5_LIB -L$ PHDF5/lib -lhdf5_hl -lhdf545 %XIOS_INC -I$ XIOS/inc46 %XIOS_LIB -L$ XIOS/lib -lxios43 %NCDF_INC -I${NETCDF}/include 44 %NCDF_LIB -L${NETCDF}/lib -lnetcdff -lnetcdf 45 %HDF5_INC -I${HDF5}/include 46 %HDF5_LIB -L${HDF5}/lib -lhdf5_hl -lhdf5 47 %XIOS_INC -I${XIOS}/inc 48 %XIOS_LIB -L${XIOS}/lib -lxios 47 49 %CPP cpp 48 50 %FC mpiifort 49 %FCFLAGS -r8 -O3 -xHost -fp-model source -traceback 51 %FCFLAGS -r8 -O3 -xHost -fp-model source -traceback ${CFLAGS} 50 52 %FFLAGS %FCFLAGS 51 53 %LD mpiifort 52 54 %FPPFLAGS -P -C -traditional 53 %LDFLAGS -lstdc++ -lz -lgpfs -lcurl 55 %LDFLAGS -lstdc++ -lz -lgpfs -lcurl ${LDFLAGS} 54 56 %AR ar 55 57 %ARFLAGS -r -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r6071 r6108 49 49 !----------------------------------------------------------------------- 50 50 rn_rdt = 600. ! time step for the dynamics (and tracer if nn_acc=0) 51 rn_rdtmin = 600. ! minimum time step on tracers (used if nn_acc=1)52 rn_rdtmax = 600. ! maximum time step on tracers (used if nn_acc=1)53 rn_rdth = 600. ! depth variation of tracer time step (used if nn_acc=1)54 51 ppglam0 = 999999.0 ! longitude of first raw and column T-point (jphgr_msh = 1) 55 52 ppgphi0 = 999999.0 ! latitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
r6060 r6108 42 42 rn_bathy = 4198. ! value of the bathymetry. if (=0) bottom flat at jpkm1 43 43 nn_msh = 0 ! create (=1) a mesh file or not (=0) 44 rn_rdt = 360. ! time step for the dynamics (and tracer if nn_acc=0) 45 rn_rdtmin = 360. ! minimum time step on tracers (used if nn_acc=1) 46 rn_rdtmax = 360. ! maximum time step on tracers (used if nn_acc=1) 44 rn_rdt = 360. ! time step for the dynamics 47 45 jphgr_msh = 1 ! type of horizontal mesh 48 46 ppglam0 = -150.0 ! longitude of first raw and column T-point (jphgr_msh = 1) … … 341 339 !----------------------------------------------------------------------- 342 340 / 343 !-----------------------------------------------------------------------344 &namdyn_nept ! Neptune effect (simplified: lateral and vertical diffusions removed)345 !-----------------------------------------------------------------------346 ln_neptramp = .false. ! ramp down Neptune velocity in shallow water347 / -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
r6060 r6108 43 43 !----------------------------------------------------------------------- 44 44 nn_bathy = 0 ! compute (=0) or read (=1) the bathymetry file 45 rn_rdt = 7200. ! time step for the dynamics (and tracer if nn_acc=0) 46 rn_rdtmin = 7200. ! minimum time step on tracers (used if nn_acc=1) 47 rn_rdtmax = 7200. ! maximum time step on tracers (used if nn_acc=1) 45 rn_rdt = 7200. ! time step for the dynamics 48 46 jphgr_msh = 5 ! type of horizontal mesh 49 47 ppglam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
r6060 r6108 46 46 !----------------------------------------------------------------------- 47 47 nn_bathy = 0 ! compute (=0) or read (=1) the bathymetry file 48 rn_rdt = 7200. ! time step for the dynamics (and tracer if nn_acc=0) 49 rn_rdtmin = 7200. ! minimum time step on tracers (used if nn_acc=1) 50 rn_rdtmax = 7200. ! maximum time step on tracers (used if nn_acc=1) 48 rn_rdt = 7200. ! time step for the dynamics 51 49 jphgr_msh = 5 ! type of horizontal mesh 52 50 ppglam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
r6060 r6108 36 36 !----------------------------------------------------------------------- 37 37 nn_bathy = 0 ! compute (=0) or read (=1) the bathymetry file 38 rn_rdt = 7200. ! time step for the dynamics (and tracer if nn_acc=0) 39 rn_rdtmin = 7200. ! minimum time step on tracers (used if nn_acc=1) 40 rn_rdtmax = 7200. ! maximum time step on tracers (used if nn_acc=1) 38 rn_rdt = 7200. ! time step for the dynamics 41 39 jphgr_msh = 5 ! type of horizontal mesh 42 40 ppglam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
r6060 r6108 40 40 !----------------------------------------------------------------------- 41 41 nn_bathy = 0 ! compute (=0) or read (=1) the bathymetry file 42 rn_rdt = 7200. ! time step for the dynamics (and tracer if nn_acc=0) 43 rn_rdtmin = 7200. ! minimum time step on tracers (used if nn_acc=1) 44 rn_rdtmax = 7200. ! maximum time step on tracers (used if nn_acc=1) 42 rn_rdt = 7200. ! time step for the dynamics 43 ! nn_baro = 60 ! number of barotropic time step ("key_dynspg_ts") 45 44 jphgr_msh = 5 ! type of horizontal mesh 46 45 ppglam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
r6073 r6108 54 54 ppacr2 = 999999. ! 55 55 rn_rdt = 2880. ! time step for the dynamics (and tracer if nn_acc=0) 56 rn_rdtmin = 14400. ! minimum time step on tracers (used if nn_acc=1)57 rn_rdtmax = 14400. ! maximum time step on tracers (used if nn_acc=1)58 56 / 59 57 !----------------------------------------------------------------------- … … 269 267 / 270 268 !----------------------------------------------------------------------- 271 &namdyn_nept ! Neptune effect (simplified: lateral and vertical diffusions removed)272 !-----------------------------------------------------------------------273 /274 !-----------------------------------------------------------------------275 269 &namobs ! observation usage ('key_diaobs') 276 270 !----------------------------------------------------------------------- -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
r6060 r6108 52 52 ppacr2 = 999999. ! 53 53 rn_rdt = 2880. ! time step for the dynamics (and tracer if nn_acc=0) 54 rn_rdtmin = 14400. ! minimum time step on tracers (used if nn_acc=1)55 rn_rdtmax = 14400. ! maximum time step on tracers (used if nn_acc=1)56 54 / 57 55 !----------------------------------------------------------------------- … … 268 266 / 269 267 !----------------------------------------------------------------------- 270 &namdyn_nept ! Neptune effect (simplified: lateral and vertical diffusions removed)271 !-----------------------------------------------------------------------272 /273 !-----------------------------------------------------------------------274 268 &namobs ! observation usage ('key_diaobs') 275 269 !----------------------------------------------------------------------- -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg
r6071 r6108 86 86 rn_rdt = 2880. ! time step for the dynamics (and tracer if nn_acc=0) 87 87 rn_atfp = 0.1 ! asselin time filter parameter 88 nn_acc = 0 ! acceleration of convergence : =1 used, rdt < rdttra(k)89 ! =0, not used, rdt = rdttra90 rn_rdtmin = 14400. ! minimum time step on tracers (used if nn_acc=1)91 rn_rdtmax = 14400. ! maximum time step on tracers (used if nn_acc=1)92 rn_rdth = 800. ! depth variation of tracer time step (used if nn_acc=1)93 88 / 94 89 !----------------------------------------------------------------------- -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
r6060 r6108 354 354 !----------------------------------------------------------------------- 355 355 / 356 !-----------------------------------------------------------------------357 &namdyn_nept ! Neptune effect (simplified: lateral and vertical diffusions removed)358 !-----------------------------------------------------------------------359 / -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
r6060 r6108 34 34 !----------------------------------------------------------------------- 35 35 nn_msh = 1 ! create (=1) a mesh file or not (=0) 36 rn_rdt = 21600. ! time step for the dynamics (and tracer if nn_acc=0) 37 rn_rdtmin = 21600. ! minimum time step on tracers (used if nn_acc=1) 38 rn_rdtmax = 21600. ! maximum time step on tracers (used if nn_acc=1) 36 rn_rdt = 21600. ! time step for the dynamics 39 37 jphgr_msh = 0 ! type of horizontal mesh 40 38 ppglam0 = 999999.0 ! longitude of first raw and column T-point (jphgr_msh = 1) -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref
r6073 r6108 34 34 nn_leapy = 0 ! Leap year calendar (1) or not (0) 35 35 ln_rstart = .false. ! start from rest (F) or from a restart file (T) 36 nn_euler = 1! = 0 : start with forward time step if ln_rstart=T37 nn_rstctl = 0! restart control ==> activated only if ln_rstart=T38 39 40 41 42 43 44 36 nn_euler = 1 ! = 0 : start with forward time step if ln_rstart=T 37 nn_rstctl = 0 ! restart control ==> activated only if ln_rstart=T 38 ! = 0 nn_date0 read in namelist ; nn_it000 : read in namelist 39 ! = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart 40 ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart 41 cn_ocerst_in = "restart" ! suffix of ocean restart name (input) 42 cn_ocerst_indir = "." ! directory from which to read input ocean restarts 43 cn_ocerst_out = "restart" ! suffix of ocean restart name (output) 44 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 45 45 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model 46 46 nn_istate = 0 ! output the initial state (1) or not (0) … … 49 49 nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 50 50 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000) 51 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T)52 51 ln_mskland = .false. ! mask land points in NetCDF outputs (costly: + ~15%) 53 52 ln_cfmeta = .false. ! output additional data to netCDF files required for compliance with the CF metadata standard … … 140 139 rn_rdt = 5760. ! time step for the dynamics (and tracer if nn_acc=0) 141 140 rn_atfp = 0.1 ! asselin time filter parameter 142 nn_acc = 0 ! acceleration of convergence : =1 used, rdt < rdttra(k)143 ! =0, not used, rdt = rdttra144 rn_rdtmin = 28800. ! minimum time step on tracers (used if nn_acc=1)145 rn_rdtmax = 28800. ! maximum time step on tracers (used if nn_acc=1)146 rn_rdth = 800. ! depth variation of tracer time step (used if nn_acc=1)147 141 ln_crs = .false. ! Logical switch for coarsening module 148 142 jphgr_msh = 0 ! type of horizontal mesh … … 276 270 ! Misc. options of sbc : 277 271 ln_traqsr = .true. ! Light penetration in the ocean (T => fill namtra_qsr ) 278 ln_dm2dc = .false.! daily mean to diurnal cycle on short wave272 ln_dm2dc = .false. ! daily mean to diurnal cycle on short wave 279 273 ln_rnf = .true. ! runoffs (T => fill namsbc_rnf) 280 274 ln_ssr = .true. ! Sea Surface Restoring on T and/or S (T => fill namsbc_ssr) … … 672 666 !----------------------------------------------------------------------- 673 667 filtide = 'bdydta/amm12_bdytide_' ! file name root of tidal forcing files 674 ln_bdytide_2ddta = .false. !675 ln_bdytide_conj = .false. !668 ln_bdytide_2ddta = .false. ! 669 ln_bdytide_conj = .false. ! 676 670 / 677 671 !!====================================================================== … … 977 971 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer 978 972 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer 979 ln_mldw = .true. ! Flag to use or not the mi zed layer depth param.973 ln_mldw = .true. ! Flag to use or not the mixed layer depth param. 980 974 / 981 975 !----------------------------------------------------------------------- … … 1257 1251 / 1258 1252 !----------------------------------------------------------------------- 1259 &namdyn_nept ! Neptune effect (simplified: lateral and vertical diffusions removed) 1260 !----------------------------------------------------------------------- 1261 ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model 1262 ln_neptsimp = .false. ! yes/no use simplified neptune 1263 1264 ln_smooth_neptvel = .false. ! yes/no smooth zunep, zvnep 1265 rn_tslse = 1.2e4 ! value of lengthscale L at the equator 1266 rn_tslsp = 3.0e3 ! value of lengthscale L at the pole 1267 ! Specify whether to ramp down the Neptune velocity in shallow 1268 ! water, and if so the depth range controlling such ramping down 1269 ln_neptramp = .true. ! ramp down Neptune velocity in shallow water 1270 rn_htrmin = 100.0 ! min. depth of transition range 1271 rn_htrmax = 200.0 ! max. depth of transition range 1272 / 1273 !----------------------------------------------------------------------- 1274 &namdiu ! Cool skin and warm layer modesl 1253 &namdiu ! Cool skin and warm layer models 1275 1254 !----------------------------------------------------------------------- 1276 1255 ln_diurnal = .false. -
branches/2015/dev_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r5836 r6108 123 123 &namtrc_bc 124 124 ! 125 cn_dir = './' ! root directory for the location of the data files 125 cn_dir_sbc = './' ! root directory for the location of SURFACE data files 126 cn_dir_cbc = './' ! root directory for the location of COASTAL data files 127 cn_dir_obc = './' ! root directory for the location of OPEN data files 126 128 / 129 !---------------------------------------------------------------------- 130 !namtrc_bdy ! Setup of tracer boundary conditions 131 !----------------------------------------------------------------------- 132 $namtrc_bdy 133 cn_trc_dflt = 'neumann' ! OBC applied by default to all tracers 134 cn_trc = 'none' ! Boundary conditions appled to the active tracers (see namtrc) 135 136 nn_trcdmp_bdy = 0 ! Use damping timescales defined in nambdy of namelist 137 ! = 0 NO damping of tracers at open boudaries 138 ! = 1 Only for tracers forced with external data 139 ! = 2 Damping applied to all tracers 140 / -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
r5385 r6108 83 83 CALL ice_run_2 ! read in namelist some run parameters 84 84 ! 85 rdt_ice = nn_fsbc * rdt tra(1)! sea-ice time step85 rdt_ice = nn_fsbc * rdt ! sea-ice time step 86 86 numit = nit000 - 1 87 87 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r5341 r6108 71 71 WRITE(numout,*) 72 72 SELECT CASE ( jprstlib ) 73 CASE ( jprstdimg )74 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname75 73 CASE DEFAULT 76 74 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname … … 192 190 ENDIF 193 191 194 IF ( jprstlib == jprstdimg ) THEN195 ! eventually read netcdf file (monobloc) for restarting on different number of processors196 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90197 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )198 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF199 ENDIF200 201 192 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt ) 202 193 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
r4696 r6108 85 85 86 86 #if ! defined key_iomput 87 # if defined key_dimgout88 !!----------------------------------------------------------------------89 !! 'key_dimgout' Direct Access file90 !!----------------------------------------------------------------------91 # include "limwri_dimg_2.h90"92 # else93 87 SUBROUTINE lim_wri_2( kt ) 94 88 !!------------------------------------------------------------------- … … 215 209 ! 216 210 END SUBROUTINE lim_wri_2 217 218 #endif219 211 220 212 SUBROUTINE lim_wri_init_2 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r5341 r6108 77 77 WRITE(numout,*) 78 78 SELECT CASE ( jprstlib ) 79 CASE ( jprstdimg )80 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname81 79 CASE DEFAULT 82 80 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname … … 331 329 ENDIF 332 330 333 IF ( jprstlib == jprstdimg ) THEN334 ! eventually read netcdf file (monobloc) for restarting on different number of processors335 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90336 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )337 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF338 ENDIF339 340 331 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib ) 341 332 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
r5517 r6108 41 41 CONTAINS 42 42 43 #if defined key_dimgout44 # include "limwri_dimg.h90"45 #else46 43 47 44 SUBROUTINE lim_wri( kindic ) … … 298 295 299 296 END SUBROUTINE lim_wri 300 #endif301 297 302 298 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OFF_SRC/domrea.F90
r6095 r6108 116 116 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 117 117 & nn_it000, nn_itend , nn_date0 , nn_time0, nn_leapy , nn_istate , nn_stock , & 118 & nn_write, ln_iscpl, ln_dimgnnn, ln_mskland , ln_cfmeta , ln_clobber, nn_chunksz, nn_euler 119 NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh , rn_hmin, rn_isfhmin, & 120 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & 121 & rn_rdtmax, rn_rdth , nn_baro , nn_closea , ln_crs, & 122 & jphgr_msh, & 118 & nn_write, ln_iscpl , ln_mskland , ln_cfmeta , ln_clobber, nn_chunksz, nn_euler 119 NAMELIST/namdom/ nn_bathy , rn_bathy , rn_e3zps_min, rn_e3zps_rat , nn_msh , rn_hmin , rn_isfhmin,& 120 & rn_atfp , rn_rdt , nn_baro , nn_closea , ln_crs , jphgr_msh, & 123 121 & ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 124 122 & ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, & … … 154 152 WRITE(numout,*) ' frequency of restart file nn_stock = ', nn_stock 155 153 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 156 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn157 154 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 158 155 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta … … 186 183 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 187 184 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 188 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday185 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 189 186 190 187 #if defined key_agrif … … 231 228 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp 232 229 WRITE(numout,*) ' time-splitting: nb of sub time-step nn_baro = ', nn_baro 233 WRITE(numout,*) ' acceleration of converge nn_acc = ', nn_acc234 WRITE(numout,*) ' nn_acc=1: surface tracer rdt rn_rdtmin = ', rn_rdtmin235 WRITE(numout,*) ' bottom tracer rdt rdtmax = ', rn_rdtmax236 WRITE(numout,*) ' depth of transition rn_rdth = ', rn_rdth237 230 WRITE(numout,*) ' suppression of closed seas (=0) nn_closea = ', nn_closea 238 231 WRITE(numout,*) ' type of horizontal mesh jphgr_msh = ', jphgr_msh … … 260 253 e3zps_rat = rn_e3zps_rat 261 254 nmsh = nn_msh 262 nacc = nn_acc263 255 atfp = rn_atfp 264 256 rdt = rn_rdt 265 rdtmin = rn_rdtmin266 rdtmax = rn_rdtmin267 rdth = rn_rdth268 269 257 #if defined key_netcdf4 270 258 ! ! NetCDF 4 case ("key_netcdf4" defined) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r6069 r6108 215 215 ENDIF 216 216 217 IF ( nacc /= 0 ) &218 & CALL ctl_stop( ' nacc /= 0 and key_asminc :', &219 & ' Assimilation increments have only been implemented', &220 & ' for synchronous time stepping' )221 217 222 218 IF ( ( ln_asmdin ).AND.( ln_asmiau ) ) & -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90
r5836 r6108 70 70 REAL(wp), POINTER, DIMENSION(:,:) :: ht_i !: Now ice thickness climatology 71 71 REAL(wp), POINTER, DIMENSION(:,:) :: ht_s !: now snow thickness 72 #endif 73 #if defined key_top 74 CHARACTER(LEN=20) :: cn_obc !: type of boundary condition to apply 75 REAL(wp) :: rn_fac !: multiplicative scaling factor 76 REAL(wp), POINTER, DIMENSION(:,:) :: trc !: now field of the tracer 77 LOGICAL :: dmp !: obc damping term 72 78 #endif 73 79 END TYPE OBC_DATA -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
r6069 r6108 321 321 ENDIF 322 322 323 IF ( (nsec_day == NINT(0.5_wp * rdt tra(1)) .OR. kt==nit000) .AND. zflag==1 ) THEN323 IF ( (nsec_day == NINT(0.5_wp * rdt) .OR. kt==nit000) .AND. zflag==1 ) THEN 324 324 ! 325 kt_tide = kt - (nsec_day - 0.5_wp * rdt tra(1))/rdttra(1)325 kt_tide = kt - (nsec_day - 0.5_wp * rdt)/rdt 326 326 ! 327 327 IF(lwp) THEN … … 376 376 END SUBROUTINE bdytide_update 377 377 378 379 378 SUBROUTINE bdy_dta_tides( kt, kit, time_offset ) 380 379 !!---------------------------------------------------------------------- … … 437 436 ! We refresh nodal factors every day below 438 437 ! This should be done somewhere else 439 IF ( ( nsec_day == NINT(0.5_wp * rdt tra(1)) .OR. kt==nit000 ) .AND. lk_first_btstp ) THEN440 ! 441 kt_tide = kt - (nsec_day - 0.5_wp * rdt tra(1))/rdttra(1)438 IF ( ( nsec_day == NINT(0.5_wp * rdt) .OR. kt==nit000 ) .AND. lk_first_btstp ) THEN 439 ! 440 kt_tide = kt - (nsec_day - 0.5_wp * rdt)/rdt 442 441 ! 443 442 IF(lwp) THEN -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
r6060 r6108 59 59 !! 60 60 NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, & 61 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & 62 & rn_rdtmax, rn_rdth , nn_closea , ln_crs, & 63 & jphgr_msh, & 61 & rn_atfp , rn_rdt ,nn_closea , ln_crs, jphgr_msh, & 64 62 & ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 65 63 & ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, & -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
r6060 r6108 50 50 !! 2. At time of output, rescale [1] by dimension and time 51 51 !! to yield the spatial and temporal average. 52 !! See. diawri_dimg.h90,sbcmod.F9052 !! See. sbcmod.F90 53 53 !! 54 54 !! ** Method : -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90
r6069 r6108 189 189 190 190 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout 191 REAL(wp) :: zsto, zout, zmax, zjulian, z dt, zmdi! temporary reals191 REAL(wp) :: zsto, zout, zmax, zjulian, zmdi ! temporary reals 192 192 INTEGER :: i_steps ! no of timesteps per hour 193 193 REAL(wp), DIMENSION(jpi,jpj ) :: zw2d, un_dm, vn_dm ! temporary workspace … … 201 201 ! ----------------- 202 202 ! Define frequency of summing to create 25 h mean 203 zdt = rdt 204 IF( nacc == 1 ) zdt = rdtmin 205 206 IF( MOD( 3600,INT(zdt) ) == 0 ) THEN 207 i_steps = 3600/INT(zdt) 203 IF( MOD( 3600,INT(rdt) ) == 0 ) THEN 204 i_steps = 3600/INT(rdt) 208 205 ELSE 209 206 CALL ctl_stop('STOP', 'dia_wri_tide: timestep must give MOD(3600,rdt) = 0 otherwise no hourly values are possible') -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
r6069 r6108 114 114 115 115 ! Conversion in m3 116 a_fwf = a_fwf * rdt tra(1)* 1.e-3116 a_fwf = a_fwf * rdt * 1.e-3 117 117 118 118 ! fwf correction to bring back the mean ssh to zero … … 402 402 WRITE(inum,*) 403 403 WRITE(inum,*) 'Net freshwater budget ' 404 WRITE(inum,9010) ' fwf = ',a_fwf, ' m3 =', a_fwf /(FLOAT(nitend-nit000+1)*rdt tra(1)) * 1.e-6,' Sv'404 WRITE(inum,9010) ' fwf = ',a_fwf, ' m3 =', a_fwf /(FLOAT(nitend-nit000+1)*rdt) * 1.e-6,' Sv' 405 405 WRITE(inum,*) 406 406 WRITE(inum,9010) ' zarea =',zarea -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
r6069 r6108 21 21 USE ioipsl ! NetCDF IPSL library 22 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE diadimg ! To write dimg24 23 USE timing ! preformance summary 25 24 USE wrk_nemo ! working arrays … … 384 383 !!---------------------------------------------------------------------- 385 384 386 #if defined key_dimgout387 cdfile_name_T = TRIM(cexper)//'_Tidal_harmonics_gridT.dimgproc'388 cdfile_name_U = TRIM(cexper)//'_Tidal_harmonics_gridU.dimgproc'389 cdfile_name_V = TRIM(cexper)//'_Tidal_harmonics_gridV.dimgproc'390 #endif391 392 385 IF(lwp) WRITE(numout,*) ' ' 393 386 IF(lwp) WRITE(numout,*) 'dia_wri_harm : Write harmonic analysis results' 394 #if defined key_dimgout395 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ Output files: ', TRIM(cdfile_name_T)396 IF(lwp) WRITE(numout,*) ' ', TRIM(cdfile_name_U)397 IF(lwp) WRITE(numout,*) ' ', TRIM(cdfile_name_V)398 #endif399 387 IF(lwp) WRITE(numout,*) ' ' 400 388 … … 402 390 !///////////// 403 391 ! 404 #if defined key_dimgout405 cltext='Elevation amplitude and phase'406 CALL dia_wri_dimg(TRIM(cdfile_name_T), TRIM(cltext), out_eta, 2*nb_ana, '2')407 #else408 392 DO jh = 1, nb_ana 409 393 CALL iom_put( TRIM(tname(jh))//'x', out_eta(:,:,jh) ) 410 394 CALL iom_put( TRIM(tname(jh))//'y', out_eta(:,:,nb_ana+jh) ) 411 395 END DO 412 #endif413 396 414 397 ! B) ubar 415 398 !///////// 416 399 ! 417 #if defined key_dimgout418 cltext='ubar amplitude and phase'419 CALL dia_wri_dimg(TRIM(cdfile_name_U), TRIM(cltext), out_u, 2*nb_ana, '2')420 #else421 400 DO jh = 1, nb_ana 422 401 CALL iom_put( TRIM(tname(jh))//'x_u', out_u(:,:,jh) ) 423 402 CALL iom_put( TRIM(tname(jh))//'y_u', out_u(:,:,nb_ana+jh) ) 424 403 END DO 425 #endif426 404 427 405 ! C) vbar 428 406 !///////// 429 407 ! 430 #if defined key_dimgout431 cltext='vbar amplitude and phase'432 CALL dia_wri_dimg(TRIM(cdfile_name_V), TRIM(cltext), out_v, 2*nb_ana, '2')433 #else434 408 DO jh = 1, nb_ana 435 409 CALL iom_put( TRIM(tname(jh))//'x_v', out_v(:,:,jh ) ) 436 410 CALL iom_put( TRIM(tname(jh))//'y_v', out_v(:,:,jh+nb_ana) ) 437 411 END DO 438 #endif439 412 ! 440 413 END SUBROUTINE dia_wri_harm -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90
r2528 r6108 72 72 73 73 IF( llfsec .OR. kfreq < 0 ) THEN ; inbsec = kfreq ! output frequency already in seconds 74 ELSE ; inbsec = kfreq * NINT( rdt tra(1)) ! from time-step to seconds74 ELSE ; inbsec = kfreq * NINT( rdt ) ! from time-step to seconds 75 75 ENDIF 76 76 iddss = NINT( rday ) ! number of seconds in 1 day … … 116 116 ! date of the beginning and the end of the run 117 117 118 zdrun = rdt tra(1)/ rday * REAL( nitend - nit000, wp ) ! length of the run in days119 zjul = fjulday - rdt tra(1)/ rday118 zdrun = rdt / rday * REAL( nitend - nit000, wp ) ! length of the run in days 119 zjul = fjulday - rdt / rday 120 120 CALL ju2ymds( zjul , iyear1, imonth1, iday1, zsec1 ) ! year/month/day of the beginning of run 121 121 CALL ju2ymds( zjul + zdrun, iyear2, imonth2, iday2, zsec2 ) ! year/month/day of the end of run -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r6069 r6108 44 44 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 45 45 USE in_out_manager ! I/O manager 46 USE diadimg ! dimg direct access file format output47 46 USE diatmb ! Top,middle,bottom output 48 47 USE dia25h ! 25h Mean output … … 102 101 END FUNCTION dia_wri_alloc 103 102 104 #if defined key_dimgout105 !!----------------------------------------------------------------------106 !! 'key_dimgout' DIMG output file107 !!----------------------------------------------------------------------108 # include "diawri_dimg.h90"109 110 #else111 103 !!---------------------------------------------------------------------- 112 104 !! Default option NetCDF output file 113 105 !!---------------------------------------------------------------------- 114 # 106 #if defined key_iomput 115 107 !!---------------------------------------------------------------------- 116 108 !! 'key_iomput' use IOM library … … 412 404 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 413 405 INTEGER :: jn, ierror ! local integers 414 REAL(wp) :: zsto, zout, zmax, zjulian , zdt! local scalars406 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 415 407 ! 416 408 REAL(wp), POINTER, DIMENSION(:,:) :: zw2d ! 2D workspace … … 437 429 438 430 ! Define frequency of output and means 439 zdt = rdt440 IF( nacc == 1 ) zdt = rdtmin441 431 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 442 432 #if defined key_diainstant 443 zsto = nwrite * zdt433 zsto = nwrite * rdt 444 434 clop = "inst("//TRIM(clop)//")" 445 435 #else 446 zsto= zdt436 zsto=rdt 447 437 clop = "ave("//TRIM(clop)//")" 448 438 #endif 449 zout = nwrite * zdt450 zmax = ( nitend - nit000 + 1 ) * zdt439 zout = nwrite * rdt 440 zmax = ( nitend - nit000 + 1 ) * rdt 451 441 452 442 ! Define indices of the horizontal output zoom and vertical limit storage … … 490 480 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 491 481 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 492 & nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )482 & nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 493 483 CALL histvert( nid_T, "deptht", "Vertical T levels", & ! Vertical grid: gdept 494 484 & "m", ipk, gdept_1d, nz_T, "down" ) … … 526 516 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu 527 517 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 528 & nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )518 & nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 529 519 CALL histvert( nid_U, "depthu", "Vertical U levels", & ! Vertical grid: gdept 530 520 & "m", ipk, gdept_1d, nz_U, "down" ) … … 539 529 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv 540 530 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 541 & nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )531 & nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 542 532 CALL histvert( nid_V, "depthv", "Vertical V levels", & ! Vertical grid : gdept 543 533 & "m", ipk, gdept_1d, nz_V, "down" ) … … 552 542 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 553 543 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 554 & nit000-1, zjulian, zdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set )544 & nit000-1, zjulian, rdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set ) 555 545 CALL histvert( nid_W, "depthw", "Vertical W levels", & ! Vertical grid: gdepw 556 546 & "m", ipk, gdepw_1d, nz_W, "down" ) … … 845 835 ! 846 836 END SUBROUTINE dia_wri 847 # endif848 849 837 #endif 850 838 … … 869 857 INTEGER :: id_i , nz_i, nh_i 870 858 INTEGER, DIMENSION(1) :: idex ! local workspace 871 REAL(wp) :: zsto, zout, zmax, zjulian , zdt859 REAL(wp) :: zsto, zout, zmax, zjulian 872 860 !!---------------------------------------------------------------------- 873 861 ! … … 878 866 clname = cdfile_name 879 867 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 880 zdt = rdt881 868 zsto = rdt 882 869 clop = "inst(x)" ! no use of the mask value (require less cpu time) 883 870 zout = rdt 884 zmax = ( nitend - nit000 + 1 ) * zdt871 zmax = ( nitend - nit000 + 1 ) * rdt 885 872 886 873 IF(lwp) WRITE(numout,*) … … 897 884 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 898 885 CALL histbeg( clname, jpi, glamt, jpj, gphit, & 899 1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit886 1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 900 887 CALL histvert( id_i, "deptht", "Vertical T levels", & ! Vertical grid : gdept 901 888 "m", jpk, gdept_1d, nz_i, "down") … … 980 967 ! ----------------- 981 968 CALL histclo( id_i ) 982 #if ! defined key_iomput && ! defined key_dimgout969 #if ! defined key_iomput 983 970 IF( ninist /= 1 ) THEN 984 971 CALL histclo( nid_T ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r6069 r6108 21 21 !! 22 22 !! we suppose that the time step is deviding the number of second of in a day 23 !! ---> MOD( rday, rdt tra(1)) == 023 !! ---> MOD( rday, rdt ) == 0 24 24 !! 25 25 !! ----------- WARNING ----------- … … 79 79 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 80 80 ENDIF 81 ! all calendar staff is based on the fact that MOD( rday, rdt tra(1)) == 082 IF( MOD( rday , rdt tra(1)) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' )83 IF( MOD( rday , 2. 84 IF( MOD( rdt tra(1), 2.) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' )85 nsecd = NINT(rday 86 nsecd05 = NINT(0.5 * rday 87 ndt = NINT( rdt tra(1))88 ndt05 = NINT(0.5 * rdt tra(1))81 ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 82 IF( MOD( rday , rdt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 83 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 84 IF( MOD( rdt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 85 nsecd = NINT(rday ) 86 nsecd05 = NINT(0.5 * rday ) 87 ndt = NINT( rdt ) 88 ndt05 = NINT(0.5 * rdt ) 89 89 90 90 IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) … … 238 238 nsec_week = nsec_week + ndt 239 239 nsec_day = nsec_day + ndt 240 adatrj = adatrj + rdt tra(1)/ rday241 fjulday = fjulday + rdt tra(1)/ rday240 adatrj = adatrj + rdt / rday 241 fjulday = fjulday + rdt / rday 242 242 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 243 243 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error … … 377 377 nminute = ( nn_time0 - nhour * 100 ) 378 378 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 379 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday379 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 380 380 ! note this is wrong if time step has changed during run 381 381 ENDIF … … 386 386 nminute = ( nn_time0 - nhour * 100 ) 387 387 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 388 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday388 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 389 389 ENDIF 390 390 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
r6069 r6108 37 37 REAL(wp), PUBLIC :: rn_e3zps_rat !: minimum thickness ration for partial steps 38 38 INTEGER , PUBLIC :: nn_msh !: = 1 create a mesh-mask file 39 INTEGER , PUBLIC :: nn_acc !: = 0/1 use of the acceleration of convergence technique40 39 REAL(wp), PUBLIC :: rn_atfp !: asselin time filter parameter 41 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics (and tracer if nacc=0) 42 REAL(wp), PUBLIC :: rn_rdtmin !: minimum time step on tracers 43 REAL(wp), PUBLIC :: rn_rdtmax !: maximum time step on tracers 44 REAL(wp), PUBLIC :: rn_rdth !: depth variation of tracer step 40 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics and tracer 45 41 INTEGER , PUBLIC :: nn_closea !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 46 42 INTEGER , PUBLIC :: nn_euler !: =0 start with forward time step or not (=1) … … 102 98 REAL(wp), PUBLIC :: e3zps_rat !: minimum thickness ration for partial steps 103 99 INTEGER , PUBLIC :: nmsh !: = 1 create a mesh-mask file 104 INTEGER , PUBLIC :: nacc !: = 0/1 use of the acceleration of convergence technique105 100 REAL(wp), PUBLIC :: atfp !: asselin time filter parameter 106 REAL(wp), PUBLIC :: rdt !: time step for the dynamics (and tracer if nacc=0) 107 REAL(wp), PUBLIC :: rdtmin !: minimum time step on tracers 108 REAL(wp), PUBLIC :: rdtmax !: maximum time step on tracers 109 REAL(wp), PUBLIC :: rdth !: depth variation of tracer step 110 111 ! !!! associated variables 112 INTEGER , PUBLIC :: neuler !: restart euler forward option (0=Euler) 113 REAL(wp), PUBLIC :: atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) 114 115 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdttra !: vertical profile of tracer time step 116 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: r2dtra !: = 2*rdttra except at nit000 (=rdttra) if neuler=0 101 REAL(wp), PUBLIC :: rdt !: time step for the dynamics and tracer 102 103 ! !!! associated variables 104 INTEGER , PUBLIC :: neuler !: restart euler forward option (0=Euler) 105 REAL(wp), PUBLIC :: atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) 106 REAL(wp), PUBLIC :: r2dt !: = 2*rdt except at nit000 (=rdt) if neuler=0 117 107 118 108 !!---------------------------------------------------------------------- … … 323 313 ierr(:) = 0 324 314 ! 325 ALLOCATE( rdttra(jpk), r2dtra(jpk),mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj), &315 ALLOCATE( mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj), & 326 316 & nfipproc(jpni,jpnj), nfilcit(jpni,jpnj), STAT=ierr(1) ) 327 317 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r6075 r6108 163 163 nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl , & 164 164 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 165 & nn_stock, nn_write , ln_ dimgnnn , ln_mskland , ln_clobber, nn_chunksz, &166 & nn_euler,ln_cfmeta, ln_iscpl165 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 166 & ln_cfmeta, ln_iscpl 167 167 NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, rn_isfhmin, & 168 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & 169 & rn_rdtmax, rn_rdth , nn_closea , ln_crs , & 170 & jphgr_msh, & 168 & rn_atfp , rn_rdt , nn_closea , ln_crs , jphgr_msh , & 171 169 & ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 172 170 & ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, & … … 213 211 ENDIF 214 212 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 215 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn216 213 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 217 214 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta … … 296 293 WRITE(numout,*) ' ocean time step rn_rdt = ', rn_rdt 297 294 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp 298 WRITE(numout,*) ' acceleration of converge nn_acc = ', nn_acc299 WRITE(numout,*) ' nn_acc=1: surface tracer rdt rn_rdtmin = ', rn_rdtmin300 WRITE(numout,*) ' bottom tracer rdt rdtmax = ', rn_rdtmax301 WRITE(numout,*) ' depth of transition rn_rdth = ', rn_rdth302 295 WRITE(numout,*) ' suppression of closed seas (=0) nn_closea = ', nn_closea 303 296 WRITE(numout,*) ' online coarsening of dynamical fields ln_crs = ', ln_crs … … 326 319 e3zps_rat = rn_e3zps_rat 327 320 nmsh = nn_msh 328 nacc = nn_acc329 321 atfp = rn_atfp 330 322 rdt = rn_rdt 331 rdtmin = rn_rdtmin332 rdtmax = rn_rdtmin333 rdth = rn_rdth334 323 335 324 #if defined key_netcdf4 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90
r6060 r6108 39 39 !! filter parameter read in namelist 40 40 !! - Model time step: 41 !! nacc = 0 : synchronous time intergration. 42 !! There is one time step only, defined by: rdt, rdttra(k)=rdt 43 !! nacc = 1 : accelerating the convergence. There is 2 different 44 !! time steps for dynamics and tracers: 45 !! rdt : dynamical part 46 !! rdttra(k): temperature and salinity 47 !! The tracer time step is a function of vertical level. the model 48 !! reference time step ( i.e. for wind stress, surface heat and 49 !! salt fluxes) is the surface tracer time step is rdttra(1). 50 !! N.B. depth dependent acceleration of convergence is not im- 51 !! plemented for s-coordinate. 41 !! synchronous time intergration. 42 !! There is one time step only, defined by: rdt for dynamics and 43 !! tracer,wind stress, surface heat and salt fluxes 52 44 !! 53 !! ** Action : - rdttra : vertical profile of tracer time step45 !! ** Action : [REMOVED - rdttra: vertical profile of tracer time step] 54 46 !! - atfp1 : = 1 - 2*atfp 55 47 !! … … 70 62 atfp1 = 1. - 2. * atfp 71 63 72 SELECT CASE ( nacc ) 64 IF(lwp) WRITE(numout,*)' synchronous time stepping' 65 IF(lwp) WRITE(numout,*)' dynamics and tracer time step = ', rdt/3600., ' hours' 73 66 74 CASE ( 0 ) ! Synchronous time stepping75 IF(lwp) WRITE(numout,*)' synchronous time stepping'76 IF(lwp) WRITE(numout,*)' dynamics and tracer time step = ', rdt/3600., ' hours'77 78 rdttra(:) = rdt79 80 CASE ( 1 ) ! Accelerating the convergence81 IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline'82 IF(lwp) WRITE(numout,*)' accelerating the convergence'83 IF(lwp) WRITE(numout,*)' dynamics time step = ', rdt/3600., ' hours'84 IF( ln_sco .AND. rdtmin /= rdtmax .AND. .NOT.ln_linssh ) &85 & CALL ctl_stop ( ' depth dependent acceleration of convergence not implemented in s-coordinates &86 & nor in variable volume' )87 IF(lwp) WRITE(numout,*)' tracers time step : dt (hours) level'88 89 DO jk = 1, jpk90 IF( gdept_1d(jk) <= rdth ) rdttra(jk) = rdtmin91 IF( gdept_1d(jk) > rdth ) THEN92 rdttra(jk) = rdtmin + ( rdtmax - rdtmin ) &93 * ( EXP( ( gdept_1d(jk ) - rdth ) / rdth ) - 1. ) &94 / ( EXP( ( gdept_1d(jpk) - rdth ) / rdth ) - 1. )95 ENDIF96 IF(lwp) WRITE(numout,"(36x,f5.2,5x,i3)") rdttra(jk)/3600., jk97 END DO98 99 CASE DEFAULT ! E R R O R100 101 WRITE(ctmp1,*) ' nacc value e r r o r, nacc= ',nacc102 CALL ctl_stop( ctmp1 )103 104 END SELECT105 67 106 68 END SUBROUTINE dom_stp -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
r6060 r6108 34 34 35 35 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used, defined from ln_zdf... namlist logicals 36 REAL(wp) :: r2dt ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=037 36 38 37 !! * Substitutions … … 61 60 ! 62 61 ! ! set time step 63 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt ra(restart with Euler time stepping)64 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt = 2. * rdt ! = 2 rdt tra(leapfrog)62 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt (restart with Euler time stepping) 63 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt = 2. * rdt ! = 2 rdt (leapfrog) 65 64 ENDIF 66 65 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r6069 r6108 42 42 INTEGER :: nn_stock !: restart file frequency 43 43 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 44 LOGICAL :: ln_dimgnnn !: type of dimgout. (F): 1 file for all proc45 !: (T): 1 file per proc46 44 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 47 45 LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r6069 r6108 8 8 !! 3.0 ! 2007-07 (D. Storkey) Changes to iom_gettime 9 9 !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) add C1D case 10 !! 3.6 ! 2014-15 DIMG format removed 10 11 !!-------------------------------------------------------------------- 11 12 … … 23 24 USE lbclnk ! lateal boundary condition / mpp exchanges 24 25 USE iom_def ! iom variables definitions 25 USE iom_ioipsl ! NetCDF format with IOIPSL library26 26 USE iom_nf90 ! NetCDF format with native NetCDF library 27 USE iom_rstdimg ! restarts access direct format "dimg" style...28 27 USE in_out_manager ! I/O manager 29 28 USE lib_mpp ! MPP library … … 246 245 CHARACTER(LEN=256) :: clname ! the name of the file based on cdname [[+clcpu]+clcpu] 247 246 CHARACTER(LEN=256) :: cltmpn ! tempory name to store clname (in writting mode) 248 CHARACTER(LEN=10) :: clsuffix ! ".nc" or ".dimg"247 CHARACTER(LEN=10) :: clsuffix ! ".nc" 249 248 CHARACTER(LEN=15) :: clcpu ! the cpu number (max jpmax_digits digits) 250 249 CHARACTER(LEN=256) :: clinfo ! info character … … 309 308 ! which suffix should we use? 310 309 SELECT CASE (iolib) 311 CASE (jpioipsl ) ; clsuffix = '.nc'312 310 CASE (jpnf90 ) ; clsuffix = '.nc' 313 CASE (jprstdimg) ; clsuffix = '.dimg'314 311 CASE DEFAULT ; clsuffix = '' 315 CALL ctl_stop( TRIM(clinfo), 'accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )312 CALL ctl_stop( TRIM(clinfo), 'accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 316 313 END SELECT 317 314 ! Add the suffix if needed … … 326 323 IF( .NOT.llok ) THEN 327 324 ! we try to add the cpu number to the name 328 IF( iolib == jprstdimg ) THEN ; WRITE(clcpu,*) narea 329 ELSE ; WRITE(clcpu,*) narea-1 330 ENDIF 325 WRITE(clcpu,*) narea-1 326 331 327 clcpu = TRIM(ADJUSTL(clcpu)) 332 328 iln = INDEX(clname,TRIM(clsuffix), back = .TRUE.) … … 375 371 END SELECT 376 372 ENDIF 377 ! Open the NetCDF or RSTDIMGfile373 ! Open the NetCDF file 378 374 ! ============= 379 375 ! do we have some free file identifier? … … 399 395 IF( istop == nstop ) THEN ! no error within this routine 400 396 SELECT CASE (iolib) 401 CASE (jpioipsl ) ; CALL iom_ioipsl_open( clname, kiomid, llwrt, llok, idompar )402 397 CASE (jpnf90 ) ; CALL iom_nf90_open( clname, kiomid, llwrt, llok, idompar ) 403 CASE (jprstdimg) ; CALL iom_rstdimg_open( clname, kiomid, llwrt, llok, idompar )404 398 CASE DEFAULT 405 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )399 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 406 400 END SELECT 407 401 ENDIF … … 438 432 IF( iom_file(jf)%nfid > 0 ) THEN 439 433 SELECT CASE (iom_file(jf)%iolib) 440 CASE (jpioipsl ) ; CALL iom_ioipsl_close( jf )441 434 CASE (jpnf90 ) ; CALL iom_nf90_close( jf ) 442 CASE (jprstdimg) ; CALL iom_rstdimg_close( jf )443 435 CASE DEFAULT 444 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )436 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 445 437 END SELECT 446 438 iom_file(jf)%nfid = 0 ! free the id … … 497 489 IF( iiv <= jpmax_vars ) THEN 498 490 SELECT CASE (iom_file(kiomid)%iolib) 499 CASE (jpioipsl ) ; iom_varid = iom_ioipsl_varid( kiomid, cdvar, iiv, kdimsz )500 491 CASE (jpnf90 ) ; iom_varid = iom_nf90_varid ( kiomid, cdvar, iiv, kdimsz, kndims ) 501 CASE (jprstdimg) ; iom_varid = -1 ! all variables are listed in iom_file 502 CASE DEFAULT 503 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 492 CASE DEFAULT 493 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 504 494 END SELECT 505 495 ELSE … … 559 549 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 560 550 SELECT CASE (iom_file(kiomid)%iolib) 561 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, pvar, itime )562 551 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar, itime ) 563 CASE (jprstdimg) ; CALL iom_rstdimg_get( kiomid, idvar, pvar ) 564 CASE DEFAULT 565 CALL ctl_stop( 'iom_g0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 552 CASE DEFAULT 553 CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 566 554 END SELECT 567 555 ENDIF … … 696 684 IF( luse_jattr ) THEN 697 685 SELECT CASE (iom_file(kiomid)%iolib) 698 CASE (jpioipsl, jprstdimg )699 CALL ctl_warn(trim(clinfo), 'lrowattr present and true but this only works with netcdf (jpnf90)')700 luse_jattr = .false.701 686 CASE (jpnf90 ) 702 687 ! Ok 703 688 CASE DEFAULT 704 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )689 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 705 690 END SELECT 706 691 ENDIF … … 875 860 876 861 SELECT CASE (iom_file(kiomid)%iolib) 877 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, &878 & pv_r1d, pv_r2d, pv_r3d )879 862 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, & 880 863 & pv_r1d, pv_r2d, pv_r3d ) 881 CASE (jprstdimg) ; CALL iom_rstdimg_get( kiomid, idom, idvar, ix1, ix2, iy1, iy2, & 882 & pv_r1d, pv_r2d, pv_r3d ) 883 CASE DEFAULT 884 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 864 CASE DEFAULT 865 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 885 866 END SELECT 886 867 … … 965 946 IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN 966 947 SELECT CASE (iom_file(kiomid)%iolib) 967 CASE (jpioipsl ) ; CALL iom_ioipsl_gettime( kiomid, idvar, ptime, cdunits, cdcalendar )968 948 CASE (jpnf90 ) ; CALL iom_nf90_gettime( kiomid, idvar, ptime, cdunits, cdcalendar ) 969 CASE (jprstdimg) ; CALL ctl_stop( TRIM(clinfo)//' case IO library == jprstdimg not coded...' ) 970 CASE DEFAULT 971 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 949 CASE DEFAULT 950 CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 972 951 END SELECT 973 952 ELSE … … 1000 979 IF( iom_file(kiomid)%nfid > 0 ) THEN 1001 980 SELECT CASE (iom_file(kiomid)%iolib) 1002 CASE (jpioipsl ) ; CALL ctl_stop('iom_getatt: only nf90 available')1003 981 CASE (jpnf90 ) ; CALL iom_nf90_getatt( kiomid, cdatt, pvar ) 1004 CASE (jprstdimg) ; CALL ctl_stop('iom_getatt: only nf90 available') 1005 CASE DEFAULT 1006 CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 982 CASE DEFAULT 983 CALL ctl_stop( 'iom_g0d_att: accepted IO library is only jpnf90' ) 1007 984 END SELECT 1008 985 ENDIF … … 1026 1003 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1027 1004 SELECT CASE (iom_file(kiomid)%iolib) 1028 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )1029 1005 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 1030 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar ) 1031 CASE DEFAULT 1032 CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1006 CASE DEFAULT 1007 CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1033 1008 END SELECT 1034 1009 ENDIF … … 1048 1023 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1049 1024 SELECT CASE (iom_file(kiomid)%iolib) 1050 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )1051 1025 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 1052 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar ) 1053 CASE DEFAULT 1054 CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1026 CASE DEFAULT 1027 CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1055 1028 END SELECT 1056 1029 ENDIF … … 1070 1043 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1071 1044 SELECT CASE (iom_file(kiomid)%iolib) 1072 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )1073 1045 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 1074 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar ) 1075 CASE DEFAULT 1076 CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1046 CASE DEFAULT 1047 CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1077 1048 END SELECT 1078 1049 ENDIF … … 1092 1063 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1093 1064 SELECT CASE (iom_file(kiomid)%iolib) 1094 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )1095 1065 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1096 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar ) 1097 CASE DEFAULT 1098 CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' ) 1066 CASE DEFAULT 1067 CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1099 1068 END SELECT 1100 1069 ENDIF … … 1654 1623 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1655 1624 DO WHILE ( idx /= 0 ) 1656 cldate = iom_sdate( fjulday - rdt tra(1)/ rday )1625 cldate = iom_sdate( fjulday - rdt / rday ) 1657 1626 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 1658 1627 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') … … 1661 1630 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 1662 1631 DO WHILE ( idx /= 0 ) 1663 cldate = iom_sdate( fjulday - rdt tra(1)/ rday, ldfull = .TRUE. )1632 cldate = iom_sdate( fjulday - rdt / rday, ldfull = .TRUE. ) 1664 1633 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 1665 1634 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') … … 1668 1637 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 1669 1638 DO WHILE ( idx /= 0 ) 1670 cldate = iom_sdate( fjulday + rdt tra(1)/ rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. )1639 cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 1671 1640 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 1672 1641 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') … … 1675 1644 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 1676 1645 DO WHILE ( idx /= 0 ) 1677 cldate = iom_sdate( fjulday + rdt tra(1)/ rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. )1646 cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 1678 1647 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 1679 1648 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r6069 r6108 29 29 INTEGER, PARAMETER, PUBLIC :: jpdom_autodta = 10 !: 30 30 31 INTEGER, PARAMETER, PUBLIC :: jpioipsl = 100 !: Use ioipsl (fliocom only) library32 31 INTEGER, PARAMETER, PUBLIC :: jpnf90 = 101 !: Use nf90 library 33 INTEGER, PARAMETER, PUBLIC :: jprstdimg = 102 !: Use restart dimgs (fortran direct acces) library 34 #if defined key_dimgout 35 INTEGER, PARAMETER, PUBLIC :: jprstlib = jprstdimg !: restarts io library 36 #else 32 37 33 INTEGER, PARAMETER, PUBLIC :: jprstlib = jpnf90 !: restarts io library 38 #endif39 34 40 35 INTEGER, PARAMETER, PUBLIC :: jp_r8 = 200 !: write REAL(8) … … 55 50 CHARACTER(LEN=240) :: name !: name of the file 56 51 INTEGER :: nfid !: identifier of the file (0 if closed) 57 INTEGER :: iolib !: library used to read the file (jpioipsl, jpnf90 or jprstdimg) 52 INTEGER :: iolib !: library used to read the file (jpnf90 or new formats, 53 !: jpioipsl option has been removed) 58 54 INTEGER :: nvars !: number of identified varibles in the file 59 55 INTEGER :: iduld !: id of the unlimited dimension -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r6073 r6108 95 95 WRITE(numout,*) 96 96 SELECT CASE ( jprstlib ) 97 CASE ( jprstdimg ) ; WRITE(numout,*) &98 ' open ocean restart binary file: ',TRIM(clpath)//clname99 97 CASE DEFAULT ; WRITE(numout,*) & 100 98 ' open ocean restart NetCDF file: ',TRIM(clpath)//clname … … 126 124 !!---------------------------------------------------------------------- 127 125 128 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics time step129 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) ) ! surface tracer time step 126 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics and tracer time step 127 130 128 IF ( .NOT. ln_diurnal_only ) THEN 131 129 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub ) ! before fields … … 191 189 SELECT CASE ( jprstlib ) 192 190 CASE ( jpnf90 ) ; WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 193 CASE ( jprstdimg ) ; WRITE(numout,*) 'rst_read : read oce binary restart file'194 191 END SELECT 195 192 IF ( snc4set%luse ) WRITE(numout,*) 'rst_read : configured with NetCDF4 support' … … 199 196 clpath = TRIM(cn_ocerst_indir) 200 197 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 201 IF ( jprstlib == jprstdimg ) THEN202 ! eventually read netcdf file (monobloc) for restarting on different number of processors203 ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90204 INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok )205 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF206 ENDIF207 198 CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt ) 208 199 ENDIF … … 218 209 !! ** Method : Read in restart.nc file fields which are necessary for restart 219 210 !!---------------------------------------------------------------------- 220 REAL(wp) :: zrdt , zrdttra1211 REAL(wp) :: zrdt 221 212 INTEGER :: jk 222 213 !!---------------------------------------------------------------------- … … 229 220 IF( zrdt /= rdt ) neuler = 0 230 221 ENDIF 231 IF( iom_varid( numror, 'rdttra1', ldstop = .FALSE. ) > 0 ) THEN 232 CALL iom_get( numror, 'rdttra1', zrdttra1 ) 233 IF( zrdttra1 /= rdttra(1) ) neuler = 0 234 ENDIF 235 236 222 237 223 ! Diurnal DSST 238 224 IF( ln_diurnal ) CALL iom_get( numror, jpdom_autoglo, 'Dsst' , x_dsst ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90
r6060 r6108 454 454 # include "mppini_2.h90" 455 455 456 # if defined key_dimgout457 !!----------------------------------------------------------------------458 !! 'key_dimgout' NO use of NetCDF files459 !!----------------------------------------------------------------------460 SUBROUTINE mpp_init_ioipsl ! Dummy routine461 END SUBROUTINE mpp_init_ioipsl462 # else463 456 SUBROUTINE mpp_init_ioipsl 464 457 !!---------------------------------------------------------------------- … … 506 499 END SUBROUTINE mpp_init_ioipsl 507 500 508 # endif509 501 #endif 510 502 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r6060 r6108 164 164 isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( rdt/REAL(nn_baro,wp) ) 165 165 ELSE ! middle of sbc time step 166 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt tra(1)) + it_offset * NINT(rdttra(1))166 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt) + it_offset * NINT(rdt) 167 167 ENDIF 168 168 imf = SIZE( sd ) … … 191 191 CALL fld_rec( kn_fsbc, sd(jf), kt_offset = it_offset, kit = kit ) ! update after record informations 192 192 193 ! if kn_fsbc*rdt trais larger than nfreqh (which is kind of odd),193 ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 194 194 ! it is possible that the before value is no more the good one... we have to re-read it 195 195 ! if before is not the last record of the file currently opened and after is the first record to be read … … 212 212 IF( sd(jf)%ln_tint ) THEN 213 213 214 ! if kn_fsbc*rdt trais larger than nfreqh (which is kind of odd),214 ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 215 215 ! it is possible that the before value is no more the good one... we have to re-read it 216 216 ! if before record is not just just before the after record... … … 243 243 ! year/month/week/day file to be not present. If the run continue further than the current 244 244 ! year/month/week/day, next year/month/week/day file must exist 245 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt tra(1)) ! second at the end of the run245 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt) ! second at the end of the run 246 246 llstop = isecend > sd(jf)%nrec_a(2) ! read more than 1 record of next year 247 247 ! we suppose that the date of next file is next day (should be ok even for weekly files...) … … 454 454 IF( PRESENT(kt_offset) ) it_offset = kt_offset 455 455 IF( PRESENT(kit) ) THEN ; it_offset = ( kit + it_offset ) * NINT( rdt/REAL(nn_baro,wp) ) 456 ELSE ; it_offset = it_offset * NINT( rdt tra(1))456 ELSE ; it_offset = it_offset * NINT( rdt ) 457 457 ENDIF 458 458 ! … … 531 531 ELSE ; ztmp = REAL(nsec_year ,wp) ! since 00h on Jan 1 of the current year 532 532 ENDIF 533 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt tra(1) + REAL( it_offset, wp )! centrered in the middle of sbc time step534 ztmp = ztmp + 0.01 * rdt tra(1)! avoid truncation error533 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt + REAL( it_offset, wp ) ! centrered in the middle of sbc time step 534 ztmp = ztmp + 0.01 * rdt ! avoid truncation error 535 535 IF( sdjf%ln_tint ) THEN ! time interpolation, shift by 1/2 record 536 536 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r6060 r6108 842 842 LOGICAL :: llnewtx, llnewtau ! update wind stress components and module?? 843 843 INTEGER :: ji, jj, jn ! dummy loop indices 844 INTEGER :: isec ! number of seconds since nit000 (assuming rdt tradid not change since nit000)844 INTEGER :: isec ! number of seconds since nit000 (assuming rdt did not change since nit000) 845 845 REAL(wp) :: zcumulneg, zcumulpos ! temporary scalars 846 846 REAL(wp) :: zcoef ! temporary scalar … … 860 860 ! ! Receive all the atmos. fields (including ice information) 861 861 ! ! ======================================================= ! 862 isec = ( kt - nit000 ) * NINT( rdt tra(1) )! date of exchanges862 isec = ( kt - nit000 ) * NINT( rdt ) ! date of exchanges 863 863 DO jn = 1, jprcv ! received fields sent by the atmosphere 864 864 IF( srcv(jn)%laction ) CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) … … 1708 1708 CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 ) 1709 1709 1710 isec = ( kt - nit000 ) * NINT( rdttra(1)) ! date of exchanges1710 isec = ( kt - nit000 ) * NINT( rdt ) ! date of exchanges 1711 1711 1712 1712 zfr_l(:,:) = 1.- fr_i(:,:) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90
r3764 r6108 90 90 91 91 ! When are we during the day (from 0 to 1) 92 zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdt tra(1)) / rday93 zup = zlo + ( REAL(nn_fsbc, wp) * rdt tra(1)) / rday92 zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdt ) / rday 93 zup = zlo + ( REAL(nn_fsbc, wp) * rdt ) / rday 94 94 ! 95 95 IF( nday_qsr == -1 ) THEN ! first time step only … … 189 189 END DO 190 190 ! 191 ztmp = rday / ( rdt tra(1)* REAL(nn_fsbc, wp) )191 ztmp = rday / ( rdt * REAL(nn_fsbc, wp) ) 192 192 rscal(:,:) = rscal(:,:) * ztmp 193 193 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
r6060 r6108 128 128 ENDIF 129 129 ! ! Update fwfold if new year start 130 ikty = 365 * 86400 / rdt tra(1)!!bug use of 365 days leap year or 360d year !!!!!!!130 ikty = 365 * 86400 / rdt !!bug use of 365 days leap year or 360d year !!!!!!! 131 131 IF( MOD( kt, ikty ) == 0 ) THEN 132 132 a_fwb_b = a_fwb ! mean sea level taking into account the ice+snow -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r6060 r6108 368 368 ! 369 369 ! sea-ice timestep and inverse 370 rdt_ice = nn_fsbc * rdt tra(1)370 rdt_ice = nn_fsbc * rdt 371 371 r1_rdtice = 1._wp / rdt_ice 372 372 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
r6069 r6108 49 49 !!---------------------------------------------------------------------- 50 50 51 IF( nsec_day == NINT(0.5_wp * rdt tra(1)) .OR. kt == nit000 ) THEN ! start a new day51 IF( nsec_day == NINT(0.5_wp * rdt) .OR. kt == nit000 ) THEN ! start a new day 52 52 ! 53 53 IF( kt == nit000 ) THEN … … 64 64 ! Temporarily set nsec_day to beginning of day. 65 65 nsec_day_orig = nsec_day 66 IF ( nsec_day /= NINT(0.5_wp * rdt tra(1)) ) THEN67 kt_tide = kt - (nsec_day - 0.5_wp * rdt tra(1))/rdttra(1)68 nsec_day = NINT(0.5_wp * rdt tra(1))66 IF ( nsec_day /= NINT(0.5_wp * rdt) ) THEN 67 kt_tide = kt - (nsec_day - 0.5_wp * rdt)/rdt 68 nsec_day = NINT(0.5_wp * rdt) 69 69 ELSE 70 70 kt_tide = kt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
r6069 r6108 94 94 ! ! set time step 95 95 IF( neuler == 0 .AND. kt == nit000 ) THEN ! at nit000 96 r2dt ra(:) = rdttra(:) ! = rdtra(restarting with Euler time stepping)96 r2dt = rdt ! = rdt (restarting with Euler time stepping) 97 97 ELSEIF( kt <= nit000 + 1) THEN ! at nit000 or nit000+1 98 r2dt ra(:) = 2._wp * rdttra(:) ! = 2 rdttra(leapfrog)98 r2dt = 2._wp * rdt ! = 2 rdt (leapfrog) 99 99 ENDIF 100 100 ! … … 133 133 CALL tra_adv_cen ( kt, nit000, 'TRA', zun, zvn, zwn , tsn, tsa, jpts, nn_cen_h, nn_cen_v ) 134 134 CASE ( np_FCT ) ! FCT scheme : 2nd / 4th order 135 CALL tra_adv_fct ( kt, nit000, 'TRA', r2dt ra, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v )135 CALL tra_adv_fct ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v ) 136 136 CASE ( np_FCT_zts ) ! 2nd order FCT with vertical time-splitting 137 CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dt ra, zun, zvn, zwn, tsb, tsn, tsa, jpts , nn_fct_zts )137 CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts , nn_fct_zts ) 138 138 CASE ( np_MUS ) ! MUSCL 139 CALL tra_adv_mus ( kt, nit000, 'TRA', r2dt ra, zun, zvn, zwn, tsb, tsa, jpts , ln_mus_ups )139 CALL tra_adv_mus ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsa, jpts , ln_mus_ups ) 140 140 CASE ( np_UBS ) ! UBS 141 CALL tra_adv_ubs ( kt, nit000, 'TRA', r2dt ra, zun, zvn, zwn, tsb, tsn, tsa, jpts , nn_ubs_v )141 CALL tra_adv_ubs ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts , nn_ubs_v ) 142 142 CASE ( np_QCK ) ! QUICKEST 143 CALL tra_adv_qck ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts ) 143 CALL tra_adv_qck ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts ) 144 ! 144 145 END SELECT 145 146 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
r6060 r6108 70 70 INTEGER , INTENT(in ) :: kn_fct_h ! order of the FCT scheme (=2 or 4) 71 71 INTEGER , INTENT(in ) :: kn_fct_v ! order of the FCT scheme (=2 or 4) 72 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step72 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 73 73 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun, pvn, pwn ! 3 ocean velocity components 74 74 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 76 76 ! 77 77 INTEGER :: ji, jj, jk, jn ! dummy loop indices 78 REAL(wp) :: z 2dtt, ztra! local scalar78 REAL(wp) :: ztra ! local scalar 79 79 REAL(wp) :: zfp_ui, zfp_vj, zfp_wk, zC2t_u, zC4t_u ! - - 80 80 REAL(wp) :: zfm_ui, zfm_vj, zfm_wk, zC2t_v, zC4t_v ! - - … … 147 147 ! 148 148 DO jk = 1, jpkm1 !* trend and after field with monotonic scheme 149 z2dtt = p2dt(jk)150 149 DO jj = 2, jpjm1 151 150 DO ji = fs_2, fs_jpim1 ! vector opt. … … 157 156 !!gm why tmask added in the two following lines ??? the mask is done in tranxt ! 158 157 pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra * tmask(ji,jj,jk) 159 zwi(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + z2dtt * ztra ) * tmask(ji,jj,jk)158 zwi(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + p2dt * ztra ) * tmask(ji,jj,jk) 160 159 END DO 161 160 END DO … … 342 341 INTEGER , INTENT(in ) :: kjpt ! number of tracers 343 342 INTEGER , INTENT(in ) :: kn_fct_zts ! number of number of vertical sub-timesteps 344 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step343 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 345 344 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun, pvn, pwn ! 3 ocean velocity components 346 345 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 348 347 ! 349 348 REAL(wp), DIMENSION( jpk ) :: zts ! length of sub-timestep for vertical advection 350 REAL(wp) , DIMENSION( jpk ):: zr_p2dt ! reciprocal of tracer timestep349 REAL(wp) :: zr_p2dt ! reciprocal of tracer timestep 351 350 INTEGER :: ji, jj, jk, jl, jn ! dummy loop indices 352 351 INTEGER :: jtb, jtn, jta ! sub timestep pointers for leap-frog/euler forward steps 353 352 INTEGER :: jtaken ! toggle for collecting appropriate fluxes from sub timesteps 354 353 REAL(wp) :: z_rzts ! Fractional length of Euler forward sub-timestep for vertical advection 355 REAL(wp) :: z 2dtt, ztra! local scalar354 REAL(wp) :: ztra ! local scalar 356 355 REAL(wp) :: zfp_ui, zfp_vj, zfp_wk ! - - 357 356 REAL(wp) :: zfm_ui, zfm_vj, zfm_wk ! - - … … 384 383 zwi(:,:,:) = 0._wp 385 384 z_rzts = 1._wp / REAL( kn_fct_zts, wp ) 386 zr_p2dt (:) = 1._wp / p2dt(:)385 zr_p2dt = 1._wp / p2dt 387 386 ! 388 387 ! surface & Bottom value : flux set to zero for all tracers … … 432 431 ! 433 432 DO jk = 1, jpkm1 ! total advective trend 434 z2dtt = p2dt(jk)435 433 DO jj = 2, jpjm1 436 434 DO ji = fs_2, fs_jpim1 ! vector opt. … … 441 439 ! ! update and guess with monotonic sheme 442 440 pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra 443 zwi(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + z2dtt * ztra ) * tmask(ji,jj,jk)441 zwi(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + p2dt * ztra ) * tmask(ji,jj,jk) 444 442 END DO 445 443 END DO … … 496 494 IF( jl == 1 ) THEN ! Euler forward to kick things off 497 495 jtb = 1 ; jtn = 1 ; jta = 2 498 zts(:) = p2dt (:)* z_rzts496 zts(:) = p2dt * z_rzts 499 497 jtaken = MOD( kn_fct_zts + 1 , 2) ! Toggle to collect every second flux 500 498 ! ! starting at jl =1 if kn_fct_zts is odd; … … 502 500 ELSEIF( jl == 2 ) THEN ! First leapfrog step 503 501 jtb = 1 ; jtn = 2 ; jta = 3 504 zts(:) = 2._wp * p2dt (:)* z_rzts502 zts(:) = 2._wp * p2dt * z_rzts 505 503 ELSE ! Shuffle pointers for subsequent leapfrog steps 506 504 jtb = MOD(jtb,3) + 1 … … 545 543 DO jj = 2, jpjm1 546 544 DO ji = fs_2, fs_jpim1 547 zwz(ji,jj,jk) = ( zwzts(ji,jj,jk) * zr_p2dt (jk)- zwz_sav(ji,jj,jk) ) * wmask(ji,jj,jk)545 zwz(ji,jj,jk) = ( zwzts(ji,jj,jk) * zr_p2dt - zwz_sav(ji,jj,jk) ) * wmask(ji,jj,jk) 548 546 END DO 549 547 END DO … … 611 609 !! in-space based differencing for fluid 612 610 !!---------------------------------------------------------------------- 613 REAL(wp) , DIMENSION(jpk) , INTENT(in ) :: p2dt ! vertical profile oftracer time-step611 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 614 612 REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(in ) :: pbef, paft ! before & after field 615 613 REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(inout) :: paa, pbb, pcc ! monotonic fluxes in the 3 directions … … 617 615 INTEGER :: ji, jj, jk ! dummy loop indices 618 616 INTEGER :: ikm1 ! local integer 619 REAL(wp) :: zpos, zneg, zbt, za, zb, zc, zbig, zrtrn , z2dtt! local scalars617 REAL(wp) :: zpos, zneg, zbt, za, zb, zc, zbig, zrtrn ! local scalars 620 618 REAL(wp) :: zau, zbu, zcu, zav, zbv, zcv, zup, zdo ! - - 621 619 REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo, zbup, zbdo … … 640 638 DO jk = 1, jpkm1 641 639 ikm1 = MAX(jk-1,1) 642 z2dtt = p2dt(jk)643 640 DO jj = 2, jpjm1 644 641 DO ji = fs_2, fs_jpim1 ! vector opt. … … 667 664 668 665 ! up & down beta terms 669 zbt = e1e2t(ji,jj) * e3t_n(ji,jj,jk) / z2dtt666 zbt = e1e2t(ji,jj) * e3t_n(ji,jj,jk) / p2dt 670 667 zbetup(ji,jj,jk) = ( zup - paft(ji,jj,jk) ) / ( zpos + zrtrn ) * zbt 671 668 zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zdo ) / ( zneg + zrtrn ) * zbt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
r6060 r6108 73 73 INTEGER , INTENT(in ) :: kjpt ! number of tracers 74 74 LOGICAL , INTENT(in ) :: ld_msc_ups ! use upstream scheme within muscl 75 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step75 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 76 76 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun, pvn, pwn ! 3 ocean velocity components 77 77 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb ! before tracer field … … 82 82 REAL(wp) :: zu, z0u, zzwx, zw ! local scalars 83 83 REAL(wp) :: zv, z0v, zzwy, z0w ! - - 84 REAL(wp) :: z dt, zalpha! - -84 REAL(wp) :: zalpha ! - - 85 85 REAL(wp), POINTER, DIMENSION(:,:,:) :: zslpx, zslpy ! 3D workspace 86 86 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwx , zwy ! - - … … 161 161 ! 162 162 DO jk = 1, jpkm1 !-- MUSCL horizontal advective fluxes 163 zdt = p2dt(jk)164 163 DO jj = 2, jpjm1 165 164 DO ji = fs_2, fs_jpim1 ! vector opt. … … 167 166 z0u = SIGN( 0.5, pun(ji,jj,jk) ) 168 167 zalpha = 0.5 - z0u 169 zu = z0u - 0.5 * pun(ji,jj,jk) * zdt * r1_e1e2u(ji,jj) / e3u_n(ji,jj,jk)168 zu = z0u - 0.5 * pun(ji,jj,jk) * p2dt * r1_e1e2u(ji,jj) / e3u_n(ji,jj,jk) 170 169 zzwx = ptb(ji+1,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji+1,jj,jk) 171 170 zzwy = ptb(ji ,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji ,jj,jk) … … 174 173 z0v = SIGN( 0.5, pvn(ji,jj,jk) ) 175 174 zalpha = 0.5 - z0v 176 zv = z0v - 0.5 * pvn(ji,jj,jk) * zdt * r1_e1e2v(ji,jj) * e3v_n(ji,jj,jk)175 zv = z0v - 0.5 * pvn(ji,jj,jk) * p2dt * r1_e1e2v(ji,jj) * e3v_n(ji,jj,jk) 177 176 zzwx = ptb(ji,jj+1,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj+1,jk) 178 177 zzwy = ptb(ji,jj ,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj ,jk) … … 232 231 END DO 233 232 DO jk = 1, jpk-2 !-- vertical advective flux 234 zdt = p2dt(jk)235 233 DO jj = 2, jpjm1 236 234 DO ji = fs_2, fs_jpim1 ! vector opt. 237 235 z0w = SIGN( 0.5, pwn(ji,jj,jk+1) ) 238 236 zalpha = 0.5 + z0w 239 zw = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt * r1_e1e2t(ji,jj) / e3w_n(ji,jj,jk+1)237 zw = z0w - 0.5 * pwn(ji,jj,jk+1) * p2dt * r1_e1e2t(ji,jj) / e3w_n(ji,jj,jk+1) 240 238 zzwx = ptb(ji,jj,jk+1,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk+1) 241 239 zzwy = ptb(ji,jj,jk ,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
r6060 r6108 87 87 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 88 88 INTEGER , INTENT(in ) :: kjpt ! number of tracers 89 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step89 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 90 90 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun, pvn, pwn ! 3 ocean velocity components 91 91 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 125 125 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 126 126 INTEGER , INTENT(in ) :: kjpt ! number of tracers 127 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step127 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 128 128 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun ! i-velocity components 129 129 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 131 131 !! 132 132 INTEGER :: ji, jj, jk, jn ! dummy loop indices 133 REAL(wp) :: ztra, zbtr, zdir, zdx, z dt, zmsk ! local scalars133 REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk ! local scalars 134 134 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwx, zfu, zfc, zfd 135 135 !---------------------------------------------------------------------- … … 166 166 ! 167 167 DO jk = 1, jpkm1 168 zdt = p2dt(jk)169 168 DO jj = 2, jpjm1 170 169 DO ji = fs_2, fs_jpim1 ! vector opt. 171 170 zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) ) ! if pun > 0 : zdir = 1 otherwise zdir = 0 172 171 zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * e3u_n(ji,jj,jk) 173 zwx(ji,jj,jk) = ABS( pun(ji,jj,jk) ) * zdt / zdx ! (0<zc_cfl<1 : Courant number on x-direction)172 zwx(ji,jj,jk) = ABS( pun(ji,jj,jk) ) * p2dt / zdx ! (0<zc_cfl<1 : Courant number on x-direction) 174 173 zfc(ji,jj,jk) = zdir * ptb(ji ,jj,jk,jn) + ( 1. - zdir ) * ptb(ji+1,jj,jk,jn) ! FC in the x-direction for T 175 174 zfd(ji,jj,jk) = zdir * ptb(ji+1,jj,jk,jn) + ( 1. - zdir ) * ptb(ji ,jj,jk,jn) ! FD in the x-direction for T … … 242 241 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 243 242 INTEGER , INTENT(in ) :: kjpt ! number of tracers 244 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step243 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 245 244 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pvn ! j-velocity components 246 245 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 248 247 !! 249 248 INTEGER :: ji, jj, jk, jn ! dummy loop indices 250 REAL(wp) :: ztra, zbtr, zdir, zdx, z dt, zmsk ! local scalars249 REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk ! local scalars 251 250 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwy, zfu, zfc, zfd 252 251 !---------------------------------------------------------------------- … … 289 288 ! 290 289 DO jk = 1, jpkm1 291 zdt = p2dt(jk)292 290 DO jj = 2, jpjm1 293 291 DO ji = fs_2, fs_jpim1 ! vector opt. 294 292 zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) ) ! if pun > 0 : zdir = 1 otherwise zdir = 0 295 293 zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * e3v_n(ji,jj,jk) 296 zwy(ji,jj,jk) = ABS( pvn(ji,jj,jk) ) * zdt / zdx ! (0<zc_cfl<1 : Courant number on x-direction)294 zwy(ji,jj,jk) = ABS( pvn(ji,jj,jk) ) * p2dt / zdx ! (0<zc_cfl<1 : Courant number on x-direction) 297 295 zfc(ji,jj,jk) = zdir * ptb(ji,jj ,jk,jn) + ( 1. - zdir ) * ptb(ji,jj+1,jk,jn) ! FC in the x-direction for T 298 296 zfd(ji,jj,jk) = zdir * ptb(ji,jj+1,jk,jn) + ( 1. - zdir ) * ptb(ji,jj ,jk,jn) ! FD in the x-direction for T -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
r6060 r6108 86 86 INTEGER , INTENT(in ) :: kjpt ! number of tracers 87 87 INTEGER , INTENT(in ) :: kn_ubs_v ! number of tracers 88 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step88 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 89 89 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pun, pvn, pwn ! 3 ocean transport components 90 90 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb, ptn ! before and now tracer fields … … 92 92 ! 93 93 INTEGER :: ji, jj, jk, jn ! dummy loop indices 94 REAL(wp) :: ztra, zbtr, zcoef , z2dtt! local scalars94 REAL(wp) :: ztra, zbtr, zcoef ! local scalars 95 95 REAL(wp) :: zfp_ui, zfm_ui, zcenut, ztak, zfp_wk, zfm_wk ! - - 96 96 REAL(wp) :: zfp_vj, zfm_vj, zcenvt, zeeu, zeev, z_hdivn ! - - … … 213 213 ! 214 214 DO jk = 1, jpkm1 !* trend and after field with monotonic scheme 215 z2dtt = p2dt(jk)216 215 DO jj = 2, jpjm1 217 216 DO ji = fs_2, fs_jpim1 ! vector opt. 218 217 ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) 219 218 pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztak 220 zti(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + z2dtt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk)219 zti(ji,jj,jk) = ( ptb(ji,jj,jk,jn) + p2dt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk) 221 220 END DO 222 221 END DO … … 294 293 !! in-space based differencing for fluid 295 294 !!---------------------------------------------------------------------- 296 REAL(wp), INTENT(in ) , DIMENSION(jpk) :: p2dt ! vertical profile oftracer time-step295 REAL(wp), INTENT(in ) :: p2dt ! tracer time-step 297 296 REAL(wp), DIMENSION (jpi,jpj,jpk) :: pbef ! before field 298 297 REAL(wp), INTENT(inout), DIMENSION (jpi,jpj,jpk) :: paft ! after field … … 301 300 INTEGER :: ji, jj, jk ! dummy loop indices 302 301 INTEGER :: ikm1 ! local integer 303 REAL(wp) :: zpos, zneg, zbt, za, zb, zc, zbig, zrtrn , z2dtt! local scalars302 REAL(wp) :: zpos, zneg, zbt, za, zb, zc, zbig, zrtrn ! local scalars 304 303 REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo 305 304 !!---------------------------------------------------------------------- … … 350 349 ! --------------------------------------------------- 351 350 DO jk = 1, jpkm1 352 z2dtt = p2dt(jk)353 351 DO jj = 2, jpjm1 354 352 DO ji = fs_2, fs_jpim1 ! vector opt. … … 357 355 zneg = MAX( 0., pcc(ji ,jj ,jk ) ) - MIN( 0., pcc(ji ,jj ,jk+1) ) 358 356 ! up & down beta terms 359 zbt = e1e2t(ji,jj) * e3t_n(ji,jj,jk) / z2dtt357 zbt = e1e2t(ji,jj) * e3t_n(ji,jj,jk) / p2dt 360 358 zbetup(ji,jj,jk) = ( zbetup(ji,jj,jk) - paft(ji,jj,jk) ) / (zpos+zrtrn) * zbt 361 359 zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zbetdo(ji,jj,jk) ) / (zneg+zrtrn) * zbt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
r6069 r6108 128 128 ENDIF 129 129 ! ! set time step size (Euler/Leapfrog) 130 IF( neuler == 0 .AND. kt == nit000 ) THEN ; z2dt = rdt tra(1)! at nit000 (Euler)131 ELSE ; z2dt = 2.* rdt tra(1)! (Leapfrog)130 IF( neuler == 0 .AND. kt == nit000 ) THEN ; z2dt = rdt ! at nit000 (Euler) 131 ELSE ; z2dt = 2.* rdt ! (Leapfrog) 132 132 ENDIF 133 133 z1_2dt = 1._wp / z2dt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90
r6060 r6108 113 113 ENDIF 114 114 ! ! set time step size (Euler/Leapfrog) 115 IF( neuler == 0 .AND. kt == kit000 ) THEN ; z2dt = rdt tra(1)! at nit000 (Euler)116 ELSE ; z2dt = 2.* rdt tra(1)! (Leapfrog)115 IF( neuler == 0 .AND. kt == kit000 ) THEN ; z2dt = rdt ! at nit000 (Euler) 116 ELSE ; z2dt = 2.* rdt ! (Leapfrog) 117 117 ENDIF 118 118 z1_2dt = 1._wp / z2dt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r6069 r6108 116 116 117 117 ! set time step size (Euler/Leapfrog) 118 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt ra(:) = rdttra(:)! at nit000 (Euler)119 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt ra(:) = 2._wp* rdttra(:)! at nit000 or nit000+1 (Leapfrog)118 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! at nit000 (Euler) 119 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt = 2._wp* rdt ! at nit000 or nit000+1 (Leapfrog) 120 120 ENDIF 121 121 … … 140 140 ELSE ! Leap-Frog + Asselin filter time stepping 141 141 ! 142 IF( ln_linssh ) THEN ; CALL tra_nxt_fix( kt, nit000, 143 ELSE ; CALL tra_nxt_vvl( kt, nit000, rdt tra, 'TRA', tsb, tsn, tsa, &142 IF( ln_linssh ) THEN ; CALL tra_nxt_fix( kt, nit000, 'TRA', tsb, tsn, tsa, jpts ) ! linear free surface 143 ELSE ; CALL tra_nxt_vvl( kt, nit000, rdt, 'TRA', tsb, tsn, tsa, & 144 144 & sbc_tsc, sbc_tsc_b, jpts ) ! non-linear free surface 145 145 ENDIF … … 154 154 IF( l_trdtra ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt 155 155 DO jk = 1, jpkm1 156 zfact = 1._wp / r2dt ra(jk)156 zfact = 1._wp / r2dt 157 157 ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact 158 158 ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact … … 238 238 INTEGER , INTENT(in ) :: kt ! ocean time-step index 239 239 INTEGER , INTENT(in ) :: kit000 ! first time step index 240 REAL(wp) , DIMENSION(jpk), INTENT(in ) :: p2dt ! time-step240 REAL(wp) , INTENT(in ) :: p2dt ! time-step 241 241 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 242 242 INTEGER , INTENT(in ) :: kjpt ! number of tracers … … 271 271 DO jn = 1, kjpt 272 272 DO jk = 1, jpkm1 273 zfact1 = atfp * p2dt (jk)273 zfact1 = atfp * p2dt 274 274 zfact2 = zfact1 * r1_rau0 275 275 DO jj = 2, jpjm1 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
r6060 r6108 65 65 ! 66 66 IF( neuler == 0 .AND. kt == nit000 ) THEN ! at nit000 67 r2dt ra(:) = rdttra(:) ! = rdtra(restarting with Euler time stepping)67 r2dt = rdt ! = rdt (restarting with Euler time stepping) 68 68 ELSEIF( kt <= nit000 + 1) THEN ! at nit000 or nit000+1 69 r2dt ra(:) = 2. * rdttra(:) ! = 2 rdttra(leapfrog)69 r2dt = 2. * rdt ! = 2 rdt (leapfrog) 70 70 ENDIF 71 71 ! … … 77 77 ! 78 78 SELECT CASE ( nzdf ) ! compute lateral mixing trend and add it to the general trend 79 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt ra, nn_zdfexp, tsb, tsa, jpts ) ! explicit scheme80 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt ra, tsb, tsa, jpts ) ! implicit scheme79 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt, nn_zdfexp, tsb, tsa, jpts ) ! explicit scheme 80 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt, tsb, tsa, jpts ) ! implicit scheme 81 81 END SELECT 82 82 !!gm WHY here ! and I don't like that ! … … 89 89 IF( l_trdtra ) THEN ! save the vertical diffusive trends for further diagnostics 90 90 DO jk = 1, jpkm1 91 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ra(jk)) - ztrdt(:,:,jk)92 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ra(jk)) - ztrds(:,:,jk)91 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk) 92 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk) 93 93 END DO 94 94 !!gm this should be moved in trdtra.F90 and done on all trends -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
r6060 r6108 77 77 INTEGER , INTENT(in ) :: kjpt ! number of tracers 78 78 INTEGER , INTENT(in ) :: ksts ! number of sub-time step 79 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile of tracer time-step79 REAL(wp) , INTENT(in ) :: p2dt ! vertical profile of tracer time-step 80 80 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb ! before and now tracer fields 81 81 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) :: pta ! in: tracer trend ; out: after tracer field … … 83 83 INTEGER :: ji, jj, jk, jn, jl ! dummy loop indices 84 84 REAL(wp) :: z1_ksts, ze3tr ! local scalars 85 REAL(wp) :: ztra, ze3tb , z2dt! - -85 REAL(wp) :: ztra, ze3tb ! - - 86 86 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztb, zwf 87 87 !!--------------------------------------------------------------------- … … 123 123 ! 124 124 DO jk = 1, jpkm1 ! 2nd vertical derivative ==> tracer at kt+l*2*rdt/nn_zdfexp 125 z2dt = z1_ksts * p2dt(jk)126 125 DO jj = 2, jpjm1 127 126 DO ji = fs_2, fs_jpim1 ! vector opt. 128 ztb(ji,jj,jk) = ztb(ji,jj,jk) + z2dt * ( zwf(ji,jj,jk) - zwf(ji,jj,jk+1) ) / e3t_n(ji,jj,jk)127 ztb(ji,jj,jk) = ztb(ji,jj,jk) + p2dt * ( zwf(ji,jj,jk) - zwf(ji,jj,jk+1) ) / e3t_n(ji,jj,jk) 129 128 END DO 130 129 END DO … … 137 136 DO ji = fs_2, fs_jpim1 ! vector opt. 138 137 ze3tb = e3t_b(ji,jj,jk) / e3t_n(ji,jj,jk) 139 ztra = ( ztb(ji,jj,jk) - ptb(ji,jj,jk,jn) ) + p2dt (jk)* pta(ji,jj,jk,jn) ! total trend * 2dt138 ztra = ( ztb(ji,jj,jk) - ptb(ji,jj,jk,jn) ) + p2dt * pta(ji,jj,jk,jn) ! total trend * 2dt 140 139 pta(ji,jj,jk,jn) = ( ze3tb * ptb(ji,jj,jk,jn) + ztra ) * tmask(ji,jj,jk) ! after tracer 141 140 END DO -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
r6060 r6108 77 77 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 78 78 INTEGER , INTENT(in ) :: kjpt ! number of tracers 79 REAL(wp) , DIMENSION( jpk ), INTENT(in ) :: p2dt ! vertical profile oftracer time-step79 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 80 80 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: ptb ! before and now tracer fields 81 81 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) :: pta ! in: tracer trend ; out: after tracer field … … 136 136 DO ji = fs_2, fs_jpim1 ! vector opt. 137 137 !!gm BUG I think, use e3w_a instead of e3w_n 138 zwi(ji,jj,jk) = - p2dt (jk)* zwt(ji,jj,jk ) / e3w_n(ji,jj,jk )139 zws(ji,jj,jk) = - p2dt (jk)* zwt(ji,jj,jk+1) / e3w_n(ji,jj,jk+1)138 zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk ) / e3w_n(ji,jj,jk ) 139 zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / e3w_n(ji,jj,jk+1) 140 140 zwd(ji,jj,jk) = e3t_a(ji,jj,jk) - zwi(ji,jj,jk) - zws(ji,jj,jk) 141 141 END DO … … 179 179 DO jj = 2, jpjm1 !* 2nd recurrence: Zk = Yk - Ik / Tk-1 Zk-1 180 180 DO ji = fs_2, fs_jpim1 181 pta(ji,jj,1,jn) = e3t_b(ji,jj,1) * ptb(ji,jj,1,jn) + p2dt (1)* e3t_n(ji,jj,1) * pta(ji,jj,1,jn)181 pta(ji,jj,1,jn) = e3t_b(ji,jj,1) * ptb(ji,jj,1,jn) + p2dt * e3t_n(ji,jj,1) * pta(ji,jj,1,jn) 182 182 END DO 183 183 END DO … … 185 185 DO jj = 2, jpjm1 186 186 DO ji = fs_2, fs_jpim1 187 zrhs = e3t_b(ji,jj,jk) * ptb(ji,jj,jk,jn) + p2dt (jk)* e3t_n(ji,jj,jk) * pta(ji,jj,jk,jn) ! zrhs=right hand side187 zrhs = e3t_b(ji,jj,jk) * ptb(ji,jj,jk,jn) + p2dt * e3t_n(ji,jj,jk) * pta(ji,jj,jk,jn) ! zrhs=right hand side 188 188 pta(ji,jj,jk,jn) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pta(ji,jj,jk-1,jn) 189 189 END DO -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
r6060 r6108 30 30 USE zdfddm ! ocean vertical physics: double diffusion 31 31 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 32 USE diadimg ! dimg direct access file format output33 32 USE trdmxl_rst ! restart for diagnosing the ML trends 34 33 ! … … 295 294 !! 296 295 !! ** Purpose : Compute and cumulate the mixed layer trends over an analysis 297 !! period, and write NetCDF (or dimg)outputs.296 !! period, and write NetCDF outputs. 298 297 !! 299 298 !! ** Method/usage : … … 346 345 REAL(wp), POINTER, DIMENSION(:,: ) :: ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2 347 346 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztmltrd2, zsmltrd2 ! only needed for mean diagnostics 348 #if defined key_dimgout349 INTEGER :: iyear,imon,iday350 CHARACTER(LEN=80) :: cltext, clmode351 #endif352 347 !!---------------------------------------------------------------------- 353 348 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
r5341 r6108 62 62 WRITE(numout,*) 63 63 SELECT CASE ( jprstlib ) 64 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ocean restart_mxl binary file: '//clname65 64 CASE DEFAULT ; WRITE(numout,*) ' open ocean restart_mxl NetCDF file: '//clname 66 65 END SELECT … … 147 146 clpath = TRIM(cn_ocerst_indir) 148 147 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 149 150 IF ( jprstlib == jprstdimg ) THEN151 ! eventually read netcdf file (monobloc) for restarting on different number of processors152 ! if {cn_trdrst_in}.nc exists, then set jlibalt to jpnf90153 INQUIRE( FILE = TRIM(clpath)//TRIM(cn_trdrst_in)//'.nc', EXIST = llok )154 IF ( llok ) THEN ; jlibalt = jpnf90155 ELSE ; jlibalt = jprstlib156 ENDIF157 ENDIF158 159 148 CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_in), inum, kiolib = jlibalt ) 160 149 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
r6060 r6108 37 37 38 38 PUBLIC trd_tra ! called by all tra_... modules 39 40 REAL(wp) :: r2dt ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=041 39 42 40 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: trdtx, trdty, trdt ! use to store the temperature trends … … 228 226 !!---------------------------------------------------------------------- 229 227 230 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt ra(restart with Euler time stepping)231 ELSEIF( kt <= nit000 + 1) THEN ; r2dt = 2. * rdt ! = 2 rdt tra(leapfrog)228 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt (restart with Euler time stepping) 229 ELSEIF( kt <= nit000 + 1) THEN ; r2dt = 2. * rdt ! = 2 rdt (leapfrog) 232 230 ENDIF 233 231 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
r6060 r6108 84 84 !! 85 85 !! ** Purpose : computation of cumulated trends over analysis period 86 !! and make outputs (NetCDF or DIMGformat)86 !! and make outputs (NetCDF format) 87 87 !!---------------------------------------------------------------------- 88 88 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: putrd, pvtrd ! U and V trends … … 317 317 !! 318 318 !! ** Purpose : computation of cumulated trends over analysis period 319 !! and make outputs (NetCDF or DIMGformat)319 !! and make outputs (NetCDF format) 320 320 !!---------------------------------------------------------------------- 321 321 INTEGER , INTENT(in ) :: kt ! time step -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r5563 r6108 20 20 !! 21 21 !! we suppose that the time step is deviding the number of second of in a day 22 !! ---> MOD( rday, rdt tra(1)) == 022 !! ---> MOD( rday, rdt ) == 0 23 23 !! 24 24 !! ----------- WARNING ----------- … … 76 76 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 77 77 ENDIF 78 ! all calendar staff is based on the fact that MOD( rday, rdt tra(1)) == 079 IF( MOD( rday , rdttra(1)) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' )80 IF( MOD( rday , 2.) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' )81 IF( MOD( rdt tra(1), 2.) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' )82 nsecd = NINT(rday 83 nsecd05 = NINT(0.5 * rday 84 ndt = NINT( rdt tra(1))85 ndt05 = NINT(0.5 * rdt tra(1))78 ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 79 IF( MOD( rday , rdt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 80 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 81 IF( MOD( rdt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 82 nsecd = NINT(rday ) 83 nsecd05 = NINT(0.5 * rday ) 84 ndt = NINT( rdt ) 85 ndt05 = NINT(0.5 * rdt ) 86 86 87 87 ! ==> clem: here we read the ocean restart for the date (only if it exists) … … 224 224 nsec_week = nsec_week + ndt 225 225 nsec_day = nsec_day + ndt 226 adatrj = adatrj + rdt tra(1)/ rday227 fjulday = fjulday + rdt tra(1)/ rday226 adatrj = adatrj + rdt / rday 227 fjulday = fjulday + rdt / rday 228 228 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 229 229 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error … … 340 340 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 341 341 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 342 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday342 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 343 343 ! note this is wrong if time step has changed during run 344 344 ENDIF … … 346 346 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 347 347 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 348 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday348 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 349 349 ENDIF 350 350 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/SAS_SRC/diawri.F90
r6060 r6108 36 36 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 37 37 USE in_out_manager ! I/O manager 38 USE diadimg ! dimg direct access file format output39 38 USE diaar5, ONLY : lk_diaar5 40 39 USE iom … … 79 78 END FUNCTION dia_wri_alloc 80 79 81 #if defined key_dimgout82 !!----------------------------------------------------------------------83 !! 'key_dimgout' DIMG output file84 !!----------------------------------------------------------------------85 # include "diawri_dimg.h90"86 87 #else88 80 !!---------------------------------------------------------------------- 89 81 !! Default option NetCDF output file 90 82 !!---------------------------------------------------------------------- 91 # 83 #if defined key_iomput 92 84 !!---------------------------------------------------------------------- 93 85 !! 'key_iomput' use IOM library … … 137 129 INTEGER :: ierr ! error code return from allocation 138 130 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 139 REAL(wp) :: zsto, zout, zmax, zjulian , zdt! local scalars131 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 140 132 !!---------------------------------------------------------------------- 141 133 ! … … 156 148 157 149 ! Define frequency of output and means 158 zdt = rdt159 IF( nacc == 1 ) zdt = rdtmin160 150 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 161 151 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 162 152 ENDIF 163 153 #if defined key_diainstant 164 zsto = nwrite * zdt154 zsto = nwrite * rdt 165 155 clop = "inst("//TRIM(clop)//")" 166 156 #else 167 zsto= zdt157 zsto=rdt 168 158 clop = "ave("//TRIM(clop)//")" 169 159 #endif 170 zout = nwrite * zdt171 zmax = ( nitend - nit000 + 1 ) * zdt160 zout = nwrite * rdt 161 zmax = ( nitend - nit000 + 1 ) * rdt 172 162 173 163 ! Define indices of the horizontal output zoom and vertical limit storage … … 211 201 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 212 202 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 213 & nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )203 & nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 214 204 CALL histvert( nid_T, "deptht", "Vertical T levels", & ! Vertical grid: gdept 215 205 & "m", ipk, gdept_1d, nz_T, "down" ) … … 223 213 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu 224 214 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 225 & nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )215 & nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 226 216 CALL histvert( nid_U, "depthu", "Vertical U levels", & ! Vertical grid: gdept 227 217 & "m", ipk, gdept_1d, nz_U, "down" ) … … 235 225 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv 236 226 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 237 & nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )227 & nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 238 228 CALL histvert( nid_V, "depthv", "Vertical V levels", & ! Vertical grid : gdept 239 229 & "m", ipk, gdept_1d, nz_V, "down" ) … … 331 321 ! 332 322 END SUBROUTINE dia_wri 333 # endif334 335 323 #endif 336 324 … … 355 343 INTEGER :: id_i , nz_i, nh_i 356 344 INTEGER, DIMENSION(1) :: idex ! local workspace 357 REAL(wp) :: zsto, zout, zmax, zjulian , zdt345 REAL(wp) :: zsto, zout, zmax, zjulian 358 346 !!---------------------------------------------------------------------- 359 347 ! … … 366 354 clname = cdfile_name 367 355 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 368 zdt = rdt369 356 zsto = rdt 370 357 clop = "inst(x)" ! no use of the mask value (require less cpu time) 371 358 zout = rdt 372 zmax = ( nitend - nit000 + 1 ) * zdt359 zmax = ( nitend - nit000 + 1 ) * rdt 373 360 374 361 IF(lwp) WRITE(numout,*) … … 385 372 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 386 373 CALL histbeg( clname, jpi, glamt, jpj, gphit, & 387 1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit374 1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 388 375 CALL histvert( id_i, "deptht", "Vertical T levels", & ! Vertical grid : gdept 389 376 "m", jpk, gdept_1d, nz_i, "down") … … 428 415 ! ----------------- 429 416 CALL histclo( id_i ) 430 #if ! defined key_iomput && ! defined key_dimgout417 #if ! defined key_iomput 431 418 IF( ninist /= 1 ) THEN 432 419 CALL histclo( nid_T ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
r5385 r6108 18 18 USE trd_oce 19 19 USE trdtrc 20 USE trcbc, only : trc_bc_read 20 21 21 22 IMPLICIT NONE … … 56 57 IF( l_trdtrc ) CALL wrk_alloc( jpi, jpj, jpk, ztrmyt ) 57 58 58 IF( l_trdtrc ) THEN ! Save the trends in the ixed layer 59 CALL trc_bc_read ( kt ) ! tracers: surface and lateral Boundary Conditions 60 61 ! add here the call to BGC model 62 63 ! Save the trends in the mixed layer 64 IF( l_trdtrc ) THEN 59 65 DO jn = jp_myt0, jp_myt1 60 66 ztrmyt(:,:,:) = tra(:,:,:,jn) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90
r5836 r6108 36 36 DO jn = jp_myt0, jp_myt1 37 37 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 38 CALL iom_put( cltra, trn(:,:,:,jn) )38 IF( ln_trc_wri(jn) ) CALL iom_put( cltra, trn(:,:,:,jn) ) 39 39 END DO 40 40 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r5836 r6108 92 92 ! 93 93 ! ! set time step size (Euler/Leapfrog) 94 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ; rfact = rdttrc (1)! at nittrc00095 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ; rfact = 2. * rdttrc (1)! at nittrc000 or nittrc000+nn_dttrc (Leapfrog)94 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ; rfact = rdttrc ! at nittrc000 95 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ; rfact = 2. * rdttrc ! at nittrc000 or nittrc000+nn_dttrc (Leapfrog) 96 96 ENDIF 97 97 ! … … 102 102 xstep = rfact2 / rday ! Time step duration for biology 103 103 IF(lwp) WRITE(numout,*) 104 IF(lwp) WRITE(numout,*) ' Passive Tracer time step rfact = ', rfact, ' rdt = ', rdt tra(1)104 IF(lwp) WRITE(numout,*) ' Passive Tracer time step rfact = ', rfact, ' rdt = ', rdt 105 105 IF(lwp) write(numout,*) ' PISCES Biology time step rfact2 = ', rfact2 106 106 IF(lwp) WRITE(numout,*) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90
r5215 r6108 60 60 61 61 ALLOCATE( zdta(jpi,jpj,jpksed,jptrased), zdta1(jpi,jpj,jpksed,2), zhipor(jpoce,jpksed) ) 62 63 IF ( jprstlib == jprstdimg ) THEN64 ! eventually read netcdf file (monobloc) for restarting on different number of processors65 ! if restart_sed.nc exists, then set jlibalt to jpnf9066 INQUIRE( FILE = 'restart_sed.nc', EXIST = llok )67 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF68 ENDIF69 62 70 63 CALL iom_open( 'restart_sed', numrsr, kiolib = jlibalt ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
r6060 r6108 32 32 33 33 PUBLIC trc_adv 34 PUBLIC trc_adv_alloc35 34 PUBLIC trc_adv_ini 36 35 … … 58 57 INTEGER :: nadv ! chosen advection scheme 59 58 ! 60 REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:) :: r2dt ! vertical profile time-step, = 2 rdttra61 ! ! except at nitrrc000 (=rdt tra) if neuler=059 REAL(wp) :: r2dttrc ! vertical profile time-step, = 2 rdt 60 ! ! except at nitrrc000 (=rdt) if neuler=0 62 61 63 62 !! * Substitutions … … 69 68 !!---------------------------------------------------------------------- 70 69 CONTAINS 71 72 INTEGER FUNCTION trc_adv_alloc()73 !!----------------------------------------------------------------------74 !! *** ROUTINE trc_adv_alloc ***75 !!----------------------------------------------------------------------76 !77 ALLOCATE( r2dt(jpk), STAT=trc_adv_alloc )78 !79 IF( trc_adv_alloc /= 0 ) CALL ctl_warn('trc_adv_alloc : failed to allocate array.')80 !81 END FUNCTION trc_adv_alloc82 83 70 84 71 SUBROUTINE trc_adv( kt ) … … 102 89 ! 103 90 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ! at nittrc000 104 r2dt (:) = rdttrc(:)! = rdttrc (use or restarting with Euler time stepping)91 r2dttrc = rdttrc ! = rdttrc (use or restarting with Euler time stepping) 105 92 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ! at nittrc000 or nittrc000+1 106 r2dt (:) = 2. * rdttrc(:)! = 2 rdttrc (leapfrog)93 r2dttrc = 2. * rdttrc ! = 2 rdttrc (leapfrog) 107 94 ENDIF 108 95 ! !== effective transport ==! … … 133 120 CALL tra_adv_cen ( kt, nittrc000,'TRC', zun, zvn, zwn , trn, tra, jptra, nn_cen_h, nn_cen_v ) 134 121 CASE ( np_FCT ) ! FCT : 2nd / 4th order 135 CALL tra_adv_fct ( kt, nittrc000,'TRC', r2dt , zun, zvn, zwn, trb, trn, tra, jptra, nn_fct_h, nn_fct_v )122 CALL tra_adv_fct ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra, nn_fct_h, nn_fct_v ) 136 123 CASE ( np_FCT_zts ) ! 2nd order FCT with vertical time-splitting 137 CALL tra_adv_fct_zts( kt, nittrc000,'TRC', r2dt , zun, zvn, zwn, trb, trn, tra, jptra , nn_fct_zts )124 CALL tra_adv_fct_zts( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra , nn_fct_zts ) 138 125 CASE ( np_MUS ) ! MUSCL 139 CALL tra_adv_mus ( kt, nittrc000,'TRC', r2dt , zun, zvn, zwn, trb, tra, jptra , ln_mus_ups )126 CALL tra_adv_mus ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, tra, jptra , ln_mus_ups ) 140 127 CASE ( np_UBS ) ! UBS 141 CALL tra_adv_ubs ( kt, nittrc000,'TRC', r2dt , zun, zvn, zwn, trb, trn, tra, jptra , nn_ubs_v )128 CALL tra_adv_ubs ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra , nn_ubs_v ) 142 129 CASE ( np_QCK ) ! QUICKEST 143 CALL tra_adv_qck ( kt, nittrc000,'TRC', r2dt , zun, zvn, zwn, trb, trn, tra, jptra )130 CALL tra_adv_qck ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra ) 144 131 ! 145 132 END SELECT -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r6060 r6108 33 33 USE trdtra 34 34 USE tranxt 35 USE trcbdy ! BDY open boundaries 36 USE bdy_par, only: lk_bdy 35 37 # if defined key_agrif 36 38 USE agrif_top_interp … … 41 43 42 44 PUBLIC trc_nxt ! routine called by step.F90 43 PUBLIC trc_nxt_alloc ! routine called by nemogcm.F9044 45 45 REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:) :: r2dt46 REAL(wp) :: r2dttrc 46 47 47 48 !!---------------------------------------------------------------------- … … 51 52 !!---------------------------------------------------------------------- 52 53 CONTAINS 53 54 INTEGER FUNCTION trc_nxt_alloc()55 !!----------------------------------------------------------------------56 !! *** ROUTINE trc_nxt_alloc ***57 !!----------------------------------------------------------------------58 ALLOCATE( r2dt(jpk), STAT=trc_nxt_alloc )59 !60 IF( trc_nxt_alloc /= 0 ) CALL ctl_warn('trc_nxt_alloc : failed to allocate array')61 !62 END FUNCTION trc_nxt_alloc63 64 54 65 55 SUBROUTINE trc_nxt( kt ) … … 108 98 CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) 109 99 END DO 110 #if defined key_bdy 111 !! CALL bdy_trc( kt ) ! BDY open boundaries 112 #endif 100 101 IF( lk_bdy ) CALL trc_bdy( kt ) 113 102 114 103 ! ! set time step size (Euler/Leapfrog) 115 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ; r2dt (:) = rdttrc(:)! at nittrc000 (Euler)116 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ; r2dt (:) = 2.* rdttrc(:)! at nit000 or nit000+1 (Leapfrog)104 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ; r2dttrc = rdttrc ! at nittrc000 (Euler) 105 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ; r2dttrc = 2.* rdttrc ! at nit000 or nit000+1 (Leapfrog) 117 106 ENDIF 118 107 … … 144 133 DO jn = 1, jptra 145 134 DO jk = 1, jpkm1 146 zfact = 1._wp / r2dt (jk)135 zfact = 1._wp / r2dttrc 147 136 ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact 148 137 CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r6060 r6108 27 27 28 28 PUBLIC trc_sbc ! routine called by step.F90 29 30 REAL(wp) :: r2dt ! time-step at surface31 29 32 30 !! * Substitutions … … 87 85 88 86 IF( ln_top_euler) THEN 89 r2dt = rdttrc (1)! = rdttrc (use Euler time stepping)87 r2dt = rdttrc ! = rdttrc (use Euler time stepping) 90 88 ELSE 91 89 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! at nittrc000 92 r2dt = rdttrc (1)! = rdttrc (restarting with Euler time stepping)90 r2dt = rdttrc ! = rdttrc (restarting with Euler time stepping) 93 91 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ! at nittrc000 or nittrc000+1 94 r2dt = 2. * rdttrc (1)! = 2 rdttrc (leapfrog)92 r2dt = 2. * rdttrc ! = 2 rdttrc (leapfrog) 95 93 ENDIF 96 94 ENDIF -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r5836 r6108 25 25 USE trcsbc ! surface boundary condition (trc_sbc routine) 26 26 USE zpshde ! partial step: hor. derivative (zps_hde routine) 27 USE trcbdy ! BDY open boundaries 28 USE bdy_par, only: lk_bdy 27 29 28 30 #if defined key_agrif … … 64 66 IF( ln_trcdmp ) CALL trc_dmp ( kt ) ! internal damping trends 65 67 IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kt ) ! internal damping trends on closed seas only 68 IF( lk_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends 66 69 CALL trc_adv ( kt ) ! horizontal & vertical advection 67 70 ! ! Partial top/bottom cell: GRADh( trb ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r6060 r6108 28 28 PUBLIC trc_zdf ! called by step.F90 29 29 PUBLIC trc_zdf_ini ! called by nemogcm.F90 30 PUBLIC trc_zdf_alloc ! called by nemogcm.F9031 30 32 31 ! !!** Vertical diffusion (nam_trczdf) ** … … 36 35 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used 37 36 ! ! defined from ln_zdf... namlist logicals) 38 REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:) :: r2dt ! vertical profile time-step, = 2 rdttra39 ! ! except at nittrc000 (=rdttra) if neuler=037 REAL(wp) :: r2dttrc ! vertical profile time-step, = 2 rdt 38 ! ! except at nittrc000 (=rdt) if neuler=0 40 39 41 40 !! * Substitutions … … 48 47 !!---------------------------------------------------------------------- 49 48 CONTAINS 50 51 INTEGER FUNCTION trc_zdf_alloc()52 !!----------------------------------------------------------------------53 !! *** ROUTINE trc_zdf_alloc ***54 !!----------------------------------------------------------------------55 ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc )56 !57 IF( trc_zdf_alloc /= 0 ) CALL ctl_warn('trc_zdf_alloc : failed to allocate array.')58 !59 END FUNCTION trc_zdf_alloc60 61 49 62 50 SUBROUTINE trc_zdf( kt ) … … 76 64 ! 77 65 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ! at nittrc000 78 r2dt (:) = rdttrc(:)! = rdttrc (use or restarting with Euler time stepping)66 r2dttrc = rdttrc ! = rdttrc (use or restarting with Euler time stepping) 79 67 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ! at nittrc000 or nittrc000+1 80 r2dt (:) = 2. * rdttrc(:)! = 2 rdttrc (leapfrog)68 r2dttrc = 2. * rdttrc ! = 2 rdttrc (leapfrog) 81 69 ENDIF 82 70 … … 87 75 88 76 SELECT CASE ( nzdf ) ! compute lateral mixing trend and add it to the general trend 89 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt , nn_trczdf_exp, trb, tra, jptra ) ! explicit scheme90 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt , trb, tra, jptra ) ! implicit scheme77 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra ) ! explicit scheme 78 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra ) ! implicit scheme 91 79 END SELECT 92 80 … … 94 82 DO jn = 1, jptra 95 83 DO jk = 1, jpkm1 96 ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt (jk)) - ztrtrd(:,:,jk,jn)84 ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn) 97 85 END DO 98 86 CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
r6060 r6108 329 329 !! 330 330 !! ** Purpose : Compute and cumulate the mixed layer trends over an analysis 331 !! period, and write NetCDF (or dimg)outputs.331 !! period, and write NetCDF outputs. 332 332 !! 333 333 !! ** Method/usage : … … 389 389 ! 390 390 CHARACTER (LEN=10) :: clvar 391 #if defined key_dimgout392 INTEGER :: iyear,imon,iday393 CHARACTER(LEN=80) :: cltext, clmode394 #endif395 391 !!---------------------------------------------------------------------- 396 392 … … 773 769 ! ====================================================================== 774 770 775 ! IV.1 Code for dimg mpp output 776 ! ----------------------------- 777 778 # if defined key_dimgout 779 STOP 'Not implemented' 780 # else 781 782 ! IV.2 Code for IOIPSL/NetCDF output 771 ! IV.1 Code for IOIPSL/NetCDF output 783 772 ! ---------------------------------- 784 773 … … 864 853 icount = 1 865 854 866 # endif /* key_dimgout */867 868 855 IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN 869 856 ! … … 895 882 !! 896 883 !! ** Purpose : Compute and cumulate the mixed layer biological trends over an analysis 897 !! period, and write NetCDF (or dimg)outputs.884 !! period, and write NetCDF outputs. 898 885 !! 899 886 !! ** Method/usage : … … 942 929 LOGICAL :: llwarn = .TRUE., lldebug = .TRUE. 943 930 REAL(wp) :: zfn, zfn2 944 #if defined key_dimgout945 INTEGER :: iyear,imon,iday946 CHARACTER(LEN=80) :: cltext, clmode947 #endif948 931 !!---------------------------------------------------------------------- 949 932 ! ... Warnings … … 1054 1037 ! ====================================================================== 1055 1038 1056 ! IV.1 Code for dimg mpp output 1057 ! ----------------------------- 1058 1059 # if defined key_dimgout 1060 STOP 'Not implemented' 1061 # else 1062 1063 ! IV.2 Code for IOIPSL/NetCDF output 1039 ! IV.1 Code for IOIPSL/NetCDF output 1064 1040 ! ---------------------------------- 1065 1041 … … 1106 1082 1107 1083 1108 # endif /* key_dimgout */1109 1084 1110 1085 IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN … … 1257 1232 ! ====================================================================== 1258 1233 1259 #if defined key_dimgout1260 ???1261 #else1262 1234 ! clmxl = legend root for netCDF output 1263 1235 IF( nn_ctls_trc == 0 ) THEN ! control surface = mixed-layer with density criterion … … 1402 1374 #endif 1403 1375 1404 #endif /* key_dimgout */1405 1376 END SUBROUTINE trd_mxl_trc_init 1406 1377 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
r6060 r6108 146 146 clpath = TRIM(cn_trcrst_indir) 147 147 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 148 149 IF ( jprstlib == jprstdimg ) THEN150 ! eventually read netcdf file (monobloc) for restarting on different number of processors151 ! if {cn_trdrst_trc_in}.nc exists, then set jlibalt to jpnf90152 INQUIRE( FILE = TRIM(clpath)//TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok )153 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF154 ENDIF155 156 148 CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_trc_in), inum, kiolib = jlibalt ) 157 149 -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trc.F90
r5836 r6108 14 14 USE par_oce 15 15 USE par_trc 16 #if defined key_bdy 17 USE bdy_oce, only: nb_bdy, OBC_DATA 18 #endif 16 19 17 20 IMPLICIT NONE … … 64 67 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out !: suffix of pass. tracer restart name (output) 65 68 CHARACTER(len = 256), PUBLIC :: cn_trcrst_outdir !: restart output directory 66 REAL(wp) , PUBLIC , ALLOCATABLE, SAVE, DIMENSION(:) :: rdttrc !: vertical profile ofpassive tracer time step69 REAL(wp) , PUBLIC :: rdttrc !: passive tracer time step 67 70 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration 68 71 LOGICAL , PUBLIC :: ln_trcdta !: Read inputs data from files … … 91 94 CHARACTER(len = 20) :: clunit !: unit 92 95 LOGICAL :: llinit !: read in a file or not 96 #if defined key_my_trc 97 LOGICAL :: llsbc !: read in a file or not 98 LOGICAL :: llcbc !: read in a file or not 99 LOGICAL :: llobc !: read in a file or not 100 #endif 93 101 LOGICAL :: llsave !: save the tracer or not 94 102 END TYPE PTRACER … … 181 189 # endif 182 190 ! 191 #if defined key_bdy 192 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_dflt ! Default OBC condition for all tracers 193 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc ! Choice of boundary condition for tracers 194 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nn_trcdmp_bdy !: =T Tracer damping 195 ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 196 TYPE(OBC_DATA), PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET :: trcdta_bdy !: bdy external data (local process) 197 #endif 198 ! 183 199 184 200 !!---------------------------------------------------------------------- … … 201 217 & gtrui(jpi,jpj,jptra) , gtrvi(jpi,jpj,jptra) , & 202 218 & sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra) , & 203 & cvol(jpi,jpj,jpk) , rdttrc(jpk) , trai(jptra), &219 & cvol(jpi,jpj,jpk) , trai(jptra) , & 204 220 & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , & 205 & ln_trc_ini(jptra) , ln_trc_wri(jptra) , qsr_mean(jpi,jpj) , STAT = trc_alloc ) 221 & ln_trc_ini(jptra) , ln_trc_wri(jptra) , qsr_mean(jpi,jpj) , & 222 #if defined key_my_trc 223 & ln_trc_sbc(jptra) , ln_trc_cbc(jptra) , ln_trc_obc(jptra) , & 224 #endif 225 #if defined key_bdy 226 & cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 227 & trcdta_bdy(jptra,nb_bdy) , & 228 #endif 229 & STAT = trc_alloc ) 206 230 207 231 IF( trc_alloc /= 0 ) CALL ctl_warn('trc_alloc: failed to allocate arrays') -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
r6060 r6108 4 4 !! TOP : module for passive tracer boundary conditions 5 5 !!===================================================================== 6 !!---------------------------------------------------------------------- 7 #if defined key_top 6 !! History : 3.5 ! 2014-04 (M. Vichi, T. Lovato) Original 7 !! 3.6 ! 2015-03 (T . Lovato) Revision and BDY support 8 !!---------------------------------------------------------------------- 9 #if defined key_top 8 10 !!---------------------------------------------------------------------- 9 11 !! 'key_top' TOP model 10 12 !!---------------------------------------------------------------------- 11 !! trc_ dta : read and time interpolated passive tracer data13 !! trc_bc : read and time interpolated tracer Boundary Conditions 12 14 !!---------------------------------------------------------------------- 13 15 USE par_trc ! passive tracers parameters … … 17 19 USE lib_mpp ! MPP library 18 20 USE fldread ! read input fields 21 #if defined key_bdy 22 USE bdy_oce, only: nb_bdy , idx_bdy, ln_coords_file, rn_time_dmp, rn_time_dmp_out 23 #endif 19 24 20 25 IMPLICIT NONE … … 24 29 PUBLIC trc_bc_read ! called in trcstp.F90 or within 25 30 26 INTEGER , SAVE, PUBLIC :: nb_trcobc ! number of tracers with open BC27 INTEGER , SAVE, PUBLIC :: nb_trcsbc ! number of tracers with surface BC28 INTEGER , SAVE, PUBLIC :: nb_trccbc ! number of tracers with coastal BC31 INTEGER , SAVE, PUBLIC :: nb_trcobc ! number of tracers with open BC 32 INTEGER , SAVE, PUBLIC :: nb_trcsbc ! number of tracers with surface BC 33 INTEGER , SAVE, PUBLIC :: nb_trccbc ! number of tracers with coastal BC 29 34 INTEGER , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: n_trc_indobc ! index of tracer with OBC data 30 35 INTEGER , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: n_trc_indsbc ! index of tracer with SBC data 31 36 INTEGER , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: n_trc_indcbc ! index of tracer with CBC data 32 INTEGER , SAVE, PUBLIC :: ntra_obc ! MAX( 1, nb_trcxxx ) to avoid compilation error with bounds checking 33 INTEGER , SAVE, PUBLIC :: ntra_sbc ! MAX( 1, nb_trcxxx ) to avoid compilation error with bounds checking 34 INTEGER , SAVE, PUBLIC :: ntra_cbc ! MAX( 1, nb_trcxxx ) to avoid compilation error with bounds checking 35 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trofac ! multiplicative factor for OBCtracer values 36 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf_trcobc ! structure of data input OBC (file informations, fields read) 37 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trsfac ! multiplicative factor for SBC tracer values 38 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf_trcsbc ! structure of data input SBC (file informations, fields read) 39 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trcfac ! multiplicative factor for CBC tracer values 40 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf_trccbc ! structure of data input CBC (file informations, fields read) 41 42 !!---------------------------------------------------------------------- 43 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 44 !! $Id$ 37 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trsfac ! multiplicative factor for SBC tracer values 38 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf_trcsbc ! structure of data input SBC (file informations, fields read) 39 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trcfac ! multiplicative factor for CBC tracer values 40 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf_trccbc ! structure of data input CBC (file informations, fields read) 41 REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:) :: rf_trofac ! multiplicative factor for OBCtracer values 42 TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:), TARGET :: sf_trcobc ! structure of data input OBC (file informations, fields read) 43 TYPE(MAP_POINTER), ALLOCATABLE, DIMENSION(:) :: nbmap_ptr ! array of pointers to nbmap 44 45 !!---------------------------------------------------------------------- 46 !! NEMO/OPA 3.6 , NEMO Consortium (2015) 47 !! $Id$ 45 48 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 46 49 !!---------------------------------------------------------------------- … … 56 59 !! - allocates passive tracer BC data structure 57 60 !!---------------------------------------------------------------------- 58 INTEGER,INTENT(IN) :: ntrc ! number of tracers 59 ! 60 INTEGER :: jl, jn ! dummy loop indices 61 INTEGER :: ierr0, ierr1, ierr2, ierr3 ! temporary integers 62 INTEGER :: ios ! Local integer output status for namelist read 61 ! 62 INTEGER,INTENT(IN) :: ntrc ! number of tracers 63 INTEGER :: jl, jn , ib, ibd, ii, ij, ik ! dummy loop indices 64 INTEGER :: ierr0, ierr1, ierr2, ierr3 ! temporary integers 65 INTEGER :: ios ! Local integer output status for namelist read 66 INTEGER :: nblen, igrd ! support arrays for BDY 63 67 CHARACTER(len=100) :: clndta, clntrc 64 !! 65 CHARACTER(len=100) :: cn_dir 68 ! 69 CHARACTER(len=100) :: cn_dir_sbc, cn_dir_cbc, cn_dir_obc 70 66 71 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i ! local array of namelist informations on the fields to read 67 72 TYPE(FLD_N), DIMENSION(jpmaxtrc) :: sn_trcobc ! open … … 72 77 REAL(wp) , DIMENSION(jpmaxtrc) :: rn_trcfac ! multiplicative factor for tracer values 73 78 !! 74 NAMELIST/namtrc_bc/ cn_dir, sn_trcobc, rn_trofac, sn_trcsbc, rn_trsfac, sn_trccbc, rn_trcfac 79 NAMELIST/namtrc_bc/ cn_dir_sbc, cn_dir_cbc, cn_dir_obc, sn_trcobc, rn_trofac, sn_trcsbc, rn_trsfac, sn_trccbc, rn_trcfac 80 #if defined key_bdy 81 NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy 82 #endif 75 83 !!---------------------------------------------------------------------- 76 84 IF( nn_timing == 1 ) CALL timing_start('trc_bc_init') 77 85 ! 86 IF( lwp ) THEN 87 WRITE(numout,*) ' ' 88 WRITE(numout,*) 'trc_bc_init : Tracers Boundary Conditions (BC)' 89 WRITE(numout,*) '~~~~~~~~~~~ ' 90 ENDIF 78 91 ! Initialisation and local array allocation 79 92 ierr0 = 0 ; ierr1 = 0 ; ierr2 = 0 ; ierr3 = 0 … … 105 118 n_trc_indcbc(:) = 0 106 119 ! 107 DO jn = 1, ntrc 108 IF( ln_trc_obc(jn) ) THEN 109 nb_trcobc = nb_trcobc + 1 110 n_trc_indobc(jn) = nb_trcobc 111 ENDIF 112 IF( ln_trc_sbc(jn) ) THEN 113 nb_trcsbc = nb_trcsbc + 1 114 n_trc_indsbc(jn) = nb_trcsbc 115 ENDIF 116 IF( ln_trc_cbc(jn) ) THEN 117 nb_trccbc = nb_trccbc + 1 118 n_trc_indcbc(jn) = nb_trccbc 119 ENDIF 120 ENDDO 121 ntra_obc = MAX( 1, nb_trcobc ) ! To avoid compilation error with bounds checking 122 IF( lwp ) WRITE(numout,*) ' ' 123 IF( lwp ) WRITE(numout,*) ' Number of passive tracers to be initialized with open boundary data :', nb_trcobc 124 IF( lwp ) WRITE(numout,*) ' ' 125 ntra_sbc = MAX( 1, nb_trcsbc ) ! To avoid compilation error with bounds checking 126 IF( lwp ) WRITE(numout,*) ' ' 127 IF( lwp ) WRITE(numout,*) ' Number of passive tracers to be initialized with surface boundary data :', nb_trcsbc 128 IF( lwp ) WRITE(numout,*) ' ' 129 ntra_cbc = MAX( 1, nb_trccbc ) ! To avoid compilation error with bounds checking 130 IF( lwp ) WRITE(numout,*) ' ' 131 IF( lwp ) WRITE(numout,*) ' Number of passive tracers to be initialized with coastal boundary data :', nb_trccbc 132 IF( lwp ) WRITE(numout,*) ' ' 133 120 ! Read Boundary Conditions Namelists 134 121 REWIND( numnat_ref ) ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 135 122 READ ( numnat_ref, namtrc_bc, IOSTAT = ios, ERR = 901) … … 141 128 IF(lwm) WRITE ( numont, namtrc_bc ) 142 129 143 ! print some information for each 130 #if defined key_bdy 131 REWIND( numnat_ref ) ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 132 READ ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 133 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist', lwp ) 134 135 REWIND( numnat_cfg ) ! Namelist namtrc_bc in configuration namelist : Passive tracer data structure 136 READ ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 137 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist', lwp ) 138 IF(lwm) WRITE ( numont, namtrc_bdy ) 139 ! setup up preliminary informations for BDY structure 140 DO jn = 1, ntrc 141 DO ib = 1, nb_bdy 142 ! Set type of obc in BDY data structure (around here we may plug user override of obc type from nml) 143 IF ( ln_trc_obc(jn) ) THEN 144 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc(ib) ) 145 ELSE 146 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc_dflt(ib) ) 147 ENDIF 148 ! set damping use in BDY data structure 149 trcdta_bdy(jn,ib)%dmp = .false. 150 IF(nn_trcdmp_bdy(ib) .EQ. 1 .AND. ln_trc_obc(jn) ) trcdta_bdy(jn,ib)%dmp = .true. 151 IF(nn_trcdmp_bdy(ib) .EQ. 2 ) trcdta_bdy(jn,ib)%dmp = .true. 152 IF(trcdta_bdy(jn,ib)%cn_obc == 'frs' .AND. nn_trcdmp_bdy(ib) .NE. 0 ) & 153 & CALL ctl_stop( 'Use FRS OR relaxation' ) 154 IF (nn_trcdmp_bdy(ib) .LT. 0 .OR. nn_trcdmp_bdy(ib) .GT. 2) & 155 & CALL ctl_stop( 'Not a valid option for nn_trcdmp_bdy. Allowed: 0,1,2.' ) 156 ENDDO 157 ENDDO 158 159 #else 160 ! Force all tracers OBC to false if bdy not used 161 ln_trc_obc = .false. 162 #endif 163 ! compose BC data indexes 164 DO jn = 1, ntrc 165 IF( ln_trc_obc(jn) ) THEN 166 nb_trcobc = nb_trcobc + 1 ; n_trc_indobc(jn) = nb_trcobc 167 ENDIF 168 IF( ln_trc_sbc(jn) ) THEN 169 nb_trcsbc = nb_trcsbc + 1 ; n_trc_indsbc(jn) = nb_trcsbc 170 ENDIF 171 IF( ln_trc_cbc(jn) ) THEN 172 nb_trccbc = nb_trccbc + 1 ; n_trc_indcbc(jn) = nb_trccbc 173 ENDIF 174 ENDDO 175 176 ! Print summmary of Boundary Conditions 144 177 IF( lwp ) THEN 178 WRITE(numout,*) ' ' 179 WRITE(numout,'(a,i3)') ' Total tracers to be initialized with SURFACE BCs data:', nb_trcsbc 180 IF ( nb_trcsbc > 0 ) THEN 181 WRITE(numout,*) ' #trc NAME Boundary Mult.Fact. ' 182 DO jn = 1, ntrc 183 IF ( ln_trc_sbc(jn) ) WRITE(numout,9001) jn, TRIM( sn_trcsbc(jn)%clvar ), 'SBC', rn_trsfac(jn) 184 ENDDO 185 ENDIF 186 WRITE(numout,'(2a)') ' SURFACE BC data repository : ', TRIM(cn_dir_sbc) 187 188 WRITE(numout,*) ' ' 189 WRITE(numout,'(a,i3)') ' Total tracers to be initialized with COASTAL BCs data:', nb_trccbc 190 IF ( nb_trccbc > 0 ) THEN 191 WRITE(numout,*) ' #trc NAME Boundary Mult.Fact. ' 192 DO jn = 1, ntrc 193 IF ( ln_trc_cbc(jn) ) WRITE(numout, 9001) jn, TRIM( sn_trccbc(jn)%clvar ), 'CBC', rn_trcfac(jn) 194 ENDDO 195 ENDIF 196 WRITE(numout,'(2a)') ' COASTAL BC data repository : ', TRIM(cn_dir_cbc) 197 198 WRITE(numout,*) ' ' 199 WRITE(numout,'(a,i3)') ' Total tracers to be initialized with OPEN BCs data:', nb_trcobc 200 #if defined key_bdy 201 IF ( nb_trcobc > 0 ) THEN 202 WRITE(numout,*) ' #trc NAME Boundary Mult.Fact. OBC Settings' 203 DO jn = 1, ntrc 204 IF ( ln_trc_obc(jn) ) WRITE(numout, 9001) jn, TRIM( sn_trcobc(jn)%clvar ), 'OBC', rn_trofac(jn), (trcdta_bdy(jn,ib)%cn_obc,ib=1,nb_bdy) 205 IF ( .NOT. ln_trc_obc(jn) ) WRITE(numout, 9002) jn, 'Set data to IC and use default condition', (trcdta_bdy(jn,ib)%cn_obc,ib=1,nb_bdy) 206 ENDDO 207 WRITE(numout,*) ' ' 208 DO ib = 1, nb_bdy 209 IF (nn_trcdmp_bdy(ib) .EQ. 0) WRITE(numout,9003) ' Boundary ',ib,' -> NO damping of tracers' 210 IF (nn_trcdmp_bdy(ib) .EQ. 1) WRITE(numout,9003) ' Boundary ',ib,' -> damping ONLY for tracers with external data provided' 211 IF (nn_trcdmp_bdy(ib) .EQ. 2) WRITE(numout,9003) ' Boundary ',ib,' -> damping of ALL tracers' 212 IF (nn_trcdmp_bdy(ib) .GT. 0) THEN 213 WRITE(numout,9003) ' USE damping parameters from nambdy for boundary ', ib,' : ' 214 WRITE(numout,'(a,f10.2,a)') ' - Inflow damping time scale : ',rn_time_dmp(ib),' days' 215 WRITE(numout,'(a,f10.2,a)') ' - Outflow damping time scale : ',rn_time_dmp_out(ib),' days' 216 ENDIF 217 ENDDO 218 ENDIF 219 #endif 220 WRITE(numout,'(2a)') ' OPEN BC data repository : ', TRIM(cn_dir_obc) 221 ENDIF 222 9001 FORMAT(2x,i5, 3x, a15, 3x, a5, 6x, e11.3, 4x, 10a13) 223 9002 FORMAT(2x,i5, 3x, a41, 3x, 10a13) 224 9003 FORMAT(a, i5, a) 225 226 ! 227 #if defined key_bdy 228 ! OPEN Lateral boundary conditions 229 IF( nb_trcobc > 0 ) THEN 230 ALLOCATE ( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), nbmap_ptr(nb_trcobc), STAT=ierr1 ) 231 IF( ierr1 > 0 ) THEN 232 CALL ctl_stop( 'trc_bc_init: unable to allocate sf_trcobc structure' ) ; RETURN 233 ENDIF 234 235 igrd = 1 ! Everything is at T-points here 236 145 237 DO jn = 1, ntrc 146 IF( ln_trc_obc(jn) ) THEN 147 clndta = TRIM( sn_trcobc(jn)%clvar ) 148 IF(lwp) WRITE(numout,*) 'Preparing to read OBC data file for passive tracer number :', jn, ' name : ', clndta, & 149 & ' multiplicative factor : ', rn_trofac(jn) 150 ENDIF 151 IF( ln_trc_sbc(jn) ) THEN 152 clndta = TRIM( sn_trcsbc(jn)%clvar ) 153 IF(lwp) WRITE(numout,*) 'Preparing to read SBC data file for passive tracer number :', jn, ' name : ', clndta, & 154 & ' multiplicative factor : ', rn_trsfac(jn) 155 ENDIF 156 IF( ln_trc_cbc(jn) ) THEN 157 clndta = TRIM( sn_trccbc(jn)%clvar ) 158 IF(lwp) WRITE(numout,*) 'Preparing to read CBC data file for passive tracer number :', jn, ' name : ', clndta, & 159 & ' multiplicative factor : ', rn_trcfac(jn) 160 ENDIF 161 END DO 162 ENDIF 163 ! 164 ! The following code is written this way to reduce memory usage and repeated for each boundary data 165 ! MAV: note that this is just a placeholder and the dimensions must be changed according to 166 ! what will be done with BDY. A new structure will probably need to be included 167 ! 168 ! OPEN Lateral boundary conditions 169 IF( nb_trcobc > 0 ) THEN ! allocate only if the number of tracer to initialise is greater than zero 170 ALLOCATE( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), STAT=ierr1 ) 171 IF( ierr1 > 0 ) THEN 172 CALL ctl_stop( 'trc_bc_init: unable to allocate sf_trcobc structure' ) ; RETURN 173 ENDIF 174 ! 175 DO jn = 1, ntrc 176 IF( ln_trc_obc(jn) ) THEN ! update passive tracers arrays with input data read from file 177 jl = n_trc_indobc(jn) 178 slf_i(jl) = sn_trcobc(jn) 179 rf_trofac(jl) = rn_trofac(jn) 180 ALLOCATE( sf_trcobc(jl)%fnow(jpi,jpj,jpk) , STAT=ierr2 ) 181 IF( sn_trcobc(jn)%ln_tint ) ALLOCATE( sf_trcobc(jl)%fdta(jpi,jpj,jpk,2) , STAT=ierr3 ) 182 IF( ierr2 + ierr3 > 0 ) THEN 183 CALL ctl_stop( 'trc_bc_init : unable to allocate passive tracer OBC data arrays' ) ; RETURN 238 DO ib = 1, nb_bdy 239 240 nblen = idx_bdy(ib)%nblen(igrd) 241 242 IF ( ln_trc_obc(jn) ) THEN 243 ! Initialise from external data 244 jl = n_trc_indobc(jn) 245 slf_i(jl) = sn_trcobc(jn) 246 rf_trofac(jl) = rn_trofac(jn) 247 ALLOCATE( sf_trcobc(jl)%fnow(nblen,1,jpk) , STAT=ierr2 ) 248 IF( sn_trcobc(jn)%ln_tint ) ALLOCATE( sf_trcobc(jl)%fdta(nblen,1,jpk,2) , STAT=ierr3 ) 249 IF( ierr2 + ierr3 > 0 ) THEN 250 CALL ctl_stop( 'trc_bc_init : unable to allocate passive tracer OBC data arrays' ) ; RETURN 251 ENDIF 252 trcdta_bdy(jn,ib)%trc => sf_trcobc(jl)%fnow(:,1,:) 253 trcdta_bdy(jn,ib)%rn_fac = rf_trofac(jl) 254 ! create OBC mapping array 255 nbmap_ptr(jl)%ptr => idx_bdy(ib)%nbmap(:,igrd) 256 nbmap_ptr(jl)%ll_unstruc = ln_coords_file(igrd) 257 ELSE 258 ! Initialise obc arrays from initial conditions 259 ALLOCATE ( trcdta_bdy(jn,ib)%trc(nblen,jpk) ) 260 DO ibd = 1, nblen 261 DO ik = 1, jpkm1 262 ii = idx_bdy(ib)%nbi(ibd,igrd) 263 ij = idx_bdy(ib)%nbj(ibd,igrd) 264 trcdta_bdy(jn,ib)%trc(ibd,ik) = trn(ii,ij,ik,jn) * tmask(ii,ij,ik) 265 END DO 266 END DO 267 trcdta_bdy(jn,ib)%rn_fac = 1._wp 184 268 ENDIF 185 ENDIF 186 ! 269 ENDDO 187 270 ENDDO 188 ! ! fill sf_trcdta with slf_i and control print 189 CALL fld_fill( sf_trcobc, slf_i, cn_dir, 'trc_bc_init', 'Passive tracer OBC data', 'namtrc_bc' ) 190 ! 191 ENDIF 192 ! 271 272 CALL fld_fill( sf_trcobc, slf_i, cn_dir_obc, 'trc_bc_init', 'Passive tracer OBC data', 'namtrc_bc' ) 273 ENDIF 274 #endif 193 275 ! SURFACE Boundary conditions 194 276 IF( nb_trcsbc > 0 ) THEN ! allocate only if the number of tracer to initialise is greater than zero … … 212 294 ENDDO 213 295 ! ! fill sf_trcsbc with slf_i and control print 214 CALL fld_fill( sf_trcsbc, slf_i, cn_dir , 'trc_bc_init', 'Passive tracer SBC data', 'namtrc_bc' )296 CALL fld_fill( sf_trcsbc, slf_i, cn_dir_sbc, 'trc_bc_init', 'Passive tracer SBC data', 'namtrc_bc' ) 215 297 ! 216 298 ENDIF … … 237 319 ENDDO 238 320 ! ! fill sf_trccbc with slf_i and control print 239 CALL fld_fill( sf_trccbc, slf_i, cn_dir , 'trc_bc_init', 'Passive tracer CBC data', 'namtrc_bc' )321 CALL fld_fill( sf_trccbc, slf_i, cn_dir_cbc, 'trc_bc_init', 'Passive tracer CBC data', 'namtrc_bc' ) 240 322 ! 241 323 ENDIF … … 247 329 248 330 249 SUBROUTINE trc_bc_read(kt )331 SUBROUTINE trc_bc_read(kt, jit) 250 332 !!---------------------------------------------------------------------- 251 333 !! *** ROUTINE trc_bc_init *** … … 257 339 !!---------------------------------------------------------------------- 258 340 USE fldread 259 ! 260 INTEGER, INTENT(in) :: kt ! ocean time-step index 341 342 !! * Arguments 343 INTEGER, INTENT( in ) :: kt ! ocean time-step index 344 INTEGER, INTENT( in ), OPTIONAL :: jit ! subcycle time-step index (for timesplitting option) 261 345 !!--------------------------------------------------------------------- 262 346 ! 263 347 IF( nn_timing == 1 ) CALL timing_start('trc_bc_read') 264 348 265 IF( kt == nit000 ) THEN 266 IF(lwp) WRITE(numout,*) 267 IF(lwp) WRITE(numout,*) 'trc_bc_read : Surface boundary conditions for passive tracers.' 268 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 269 ENDIF 270 271 ! OPEN boundary conditions: DOES NOT WORK. Waiting for stable BDY 272 IF( nb_trcobc > 0 ) THEN 273 if (lwp) write(numout,'(a,i5,a,i5)') ' reading OBC data for ', nb_trcobc ,' variables at step ', kt 274 CALL fld_read(kt,1,sf_trcobc) 275 ! vertical interpolation on s-grid and partial step to be added 276 ENDIF 277 278 ! SURFACE boundary conditions 279 IF( nb_trcsbc > 0 ) THEN 280 if (lwp) write(numout,'(a,i5,a,i5)') ' reading SBC data for ', nb_trcsbc ,' variables at step ', kt 281 CALL fld_read(kt,1,sf_trcsbc) 282 ENDIF 283 284 ! COASTAL boundary conditions 285 IF( nb_trccbc > 0 ) THEN 286 if (lwp) write(numout,'(a,i5,a,i5)') ' reading CBC data for ', nb_trccbc ,' variables at step ', kt 287 CALL fld_read(kt,1,sf_trccbc) 288 ENDIF 349 IF( kt == nit000 .AND. lwp) THEN 350 WRITE(numout,*) 351 WRITE(numout,*) 'trc_bc_read : Surface boundary conditions for passive tracers.' 352 WRITE(numout,*) '~~~~~~~~~~~ ' 353 ENDIF 354 355 IF ( PRESENT(jit) ) THEN 356 357 ! OPEN boundary conditions (use time_offset=+1 as they are applied at the end of the step) 358 IF( nb_trcobc > 0 ) THEN 359 if (lwp) write(numout,'(a,i5,a,i10)') ' reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 360 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trcobc, map=nbmap_ptr, kit=jit, kt_offset=+1) 361 ENDIF 362 363 ! SURFACE boundary conditions 364 IF( nb_trcsbc > 0 ) THEN 365 if (lwp) write(numout,'(a,i5,a,i10)') ' reading SBC data for ', nb_trcsbc ,' variable(s) at step ', kt 366 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trcsbc, kit=jit) 367 ENDIF 368 369 ! COASTAL boundary conditions 370 IF( nb_trccbc > 0 ) THEN 371 if (lwp) write(numout,'(a,i5,a,i10)') ' reading CBC data for ', nb_trccbc ,' variable(s) at step ', kt 372 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trccbc, kit=jit) 373 ENDIF 374 375 ELSE 376 377 ! OPEN boundary conditions (use time_offset=+1 as they are applied at the end of the step) 378 IF( nb_trcobc > 0 ) THEN 379 if (lwp) write(numout,'(a,i5,a,i10)') ' reading OBC data for ', nb_trcobc ,' variable(s) at step ', kt 380 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trcobc, map=nbmap_ptr, kt_offset=+1) 381 ENDIF 382 383 ! SURFACE boundary conditions 384 IF( nb_trcsbc > 0 ) THEN 385 if (lwp) write(numout,'(a,i5,a,i10)') ' reading SBC data for ', nb_trcsbc ,' variable(s) at step ', kt 386 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trcsbc) 387 ENDIF 388 389 ! COASTAL boundary conditions 390 IF( nb_trccbc > 0 ) THEN 391 if (lwp) write(numout,'(a,i5,a,i10)') ' reading CBC data for ', nb_trccbc ,' variable(s) at step ', kt 392 CALL fld_read(kt=kt, kn_fsbc=1, sd=sf_trccbc) 393 ENDIF 394 395 ENDIF 396 289 397 ! 290 398 IF( nn_timing == 1 ) CALL timing_stop('trc_bc_read') … … 297 405 !!---------------------------------------------------------------------- 298 406 CONTAINS 407 408 SUBROUTINE trc_bc_init( ntrc ) ! Empty routine 409 INTEGER,INTENT(IN) :: ntrc ! number of tracers 410 WRITE(*,*) 'trc_bc_init: You should not have seen this print! error?', kt 411 END SUBROUTINE trc_bc_init 412 299 413 SUBROUTINE trc_bc_read( kt ) ! Empty routine 300 414 WRITE(*,*) 'trc_bc_read: You should not have seen this print! error?', kt -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcdia.F90
r5836 r6108 106 106 CHARACTER (len=20) :: cltra, cltrau 107 107 CHARACTER (len=80) :: cltral 108 REAL(wp) :: zsto, zout , zdt108 REAL(wp) :: zsto, zout 109 109 INTEGER :: iimi, iima, ijmi, ijma, ipk, it, itmod, iiter 110 110 !!---------------------------------------------------------------------- … … 118 118 119 119 ! Define frequency of output and means 120 zdt = rdt121 120 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 122 121 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) … … 126 125 clop = "inst("//TRIM(clop)//")" 127 126 # else 128 zsto = zdt127 zsto = rdt 129 128 clop = "ave("//TRIM(clop)//")" 130 129 # endif 131 zout = nn_writetrc * zdt130 zout = nn_writetrc * rdt 132 131 133 132 ! Define indices of the horizontal output zoom and vertical limit storage … … 182 181 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & 183 182 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 184 & iiter, zjulian, zdt, nhorit5, nit5 , domain_id=nidom, snc4chunks=snc4set)183 & iiter, zjulian, rdt, nhorit5, nit5 , domain_id=nidom, snc4chunks=snc4set) 185 184 186 185 ! Vertical grid for tracer : gdept … … 250 249 INTEGER :: jl 251 250 INTEGER :: iimi, iima, ijmi, ijma, ipk, it, itmod, iiter 252 REAL(wp) :: zsto, zout , zdt251 REAL(wp) :: zsto, zout 253 252 !!---------------------------------------------------------------------- 254 253 … … 261 260 ! 262 261 ! Define frequency of output and means 263 zdt = rdt264 262 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 265 263 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 266 264 ENDIF 267 265 # if defined key_diainstant 268 zsto = nn_writedia * zdt266 zsto = nn_writedia * rdt 269 267 clop = "inst("//TRIM(clop)//")" 270 268 # else 271 zsto = zdt269 zsto = rdt 272 270 clop = "ave("//TRIM(clop)//")" 273 271 # endif 274 zout = nn_writedia * zdt272 zout = nn_writedia * rdt 275 273 276 274 ! Define indices of the horizontal output zoom and vertical limit storage … … 302 300 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & 303 301 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 304 & iiter, zjulian, zdt, nhoritd, nitd , domain_id=nidom, snc4chunks=snc4set )302 & iiter, zjulian, rdt, nhoritd, nitd , domain_id=nidom, snc4chunks=snc4set ) 305 303 306 304 ! Vertical grid for 2d and 3d arrays … … 387 385 INTEGER :: ji, jj, jk, jl 388 386 INTEGER :: iimi, iima, ijmi, ijma, ipk, it, itmod, iiter 389 REAL(wp) :: zsto, zout , zdt387 REAL(wp) :: zsto, zout 390 388 !!---------------------------------------------------------------------- 391 389 … … 398 396 399 397 ! Define frequency of output and means 400 zdt = rdt401 398 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 402 399 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 403 400 ENDIF 404 401 # if defined key_diainstant 405 zsto = nn_writebio * zdt402 zsto = nn_writebio * rdt 406 403 clop = "inst("//TRIM(clop)//")" 407 404 # else 408 zsto = zdt405 zsto = rdt 409 406 clop = "ave("//TRIM(clop)//")" 410 407 # endif 411 zout = nn_writebio * zdt408 zout = nn_writebio * rdt 412 409 413 410 ! Define indices of the horizontal output zoom and vertical limit storage … … 435 432 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & 436 433 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 437 & iiter, zjulian, zdt, nhoritb, nitb , domain_id=nidom, snc4chunks=snc4set )434 & iiter, zjulian, rdt, nhoritb, nitb , domain_id=nidom, snc4chunks=snc4set ) 438 435 ! Vertical grid for biological trends 439 436 CALL histvert(nitb, 'deptht', 'Vertical T levels', 'm', ipk, gdept_1d, ndepitb) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
r6060 r6108 9 9 !! 3.4 ! 2010-11 (C. Ethe, G. Madec) use of fldread + dynamical allocation 10 10 !! 3.5 ! 2013-08 (M. Vichi) generalization for other BGC models 11 !!---------------------------------------------------------------------- 12 #if defined key_top 11 !! 3.6 ! 2015-03 (T. Lovato) revision of code log info 12 !!---------------------------------------------------------------------- 13 #if defined key_top 13 14 !!---------------------------------------------------------------------- 14 15 !! 'key_top' TOP model … … 71 72 IF( nn_timing == 1 ) CALL timing_start('trc_dta_init') 72 73 ! 74 IF( lwp ) THEN 75 WRITE(numout,*) ' ' 76 WRITE(numout,*) ' trc_dta_init : Tracers Initial Conditions (IC)' 77 WRITE(numout,*) ' ~~~~~~~~~~~ ' 78 ENDIF 79 ! 73 80 ! Initialisation 74 81 ierr0 = 0 ; ierr1 = 0 ; ierr2 = 0 ; ierr3 = 0 … … 76 83 ALLOCATE( n_trc_index(ntrc), slf_i(ntrc), STAT=ierr0 ) 77 84 IF( ierr0 > 0 ) THEN 78 CALL ctl_stop( 'trc_ nam: unable to allocate n_trc_index' ) ; RETURN85 CALL ctl_stop( 'trc_dta_init: unable to allocate n_trc_index' ) ; RETURN 79 86 ENDIF 80 87 nb_trcdta = 0 … … 96 103 REWIND( numnat_ref ) ! Namelist namtrc_dta in reference namelist : Passive tracer input data 97 104 READ ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901) 98 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta in reference namelist', lwp )105 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in reference namelist', lwp ) 99 106 100 107 REWIND( numnat_cfg ) ! Namelist namtrc_dta in configuration namelist : Passive tracer input data 101 108 READ ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 ) 102 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta in configuration namelist', lwp )109 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in configuration namelist', lwp ) 103 110 IF(lwm) WRITE ( numont, namtrc_dta ) 104 111 … … 108 115 clndta = TRIM( sn_trcdta(jn)%clvar ) 109 116 clntrc = TRIM( ctrcnm (jn) ) 117 if (jn > jptra) clntrc='Dummy' ! By pass weird formats in ocean.output if ntrc > jptra 110 118 zfact = rn_trfac(jn) 111 119 IF( clndta /= clntrc ) THEN 112 CALL ctl_warn( 'trc_dta_init: passive tracer data initialisation :', &113 & ' the variable name in the data file : '//clndta// &114 & ' must be the same than the name of the passive tracer : '//clntrc//' ')120 CALL ctl_warn( 'trc_dta_init: passive tracer data initialisation ', & 121 & 'Input name of data file : '//TRIM(clndta)// & 122 & ' differs from that of tracer : '//TRIM(clntrc)//' ') 115 123 ENDIF 116 WRITE(numout,*) ' read an initial file for passive tracer number :', jn, ' name : ', clndta, & 117 & ' multiplicative factor : ', zfact 124 WRITE(numout,*) ' ' 125 WRITE(numout,'(a, i3,3a,e11.3)') ' Read IC file for tracer number :', & 126 & jn, ', name : ', TRIM(clndta), ', Multiplicative Scaling factor : ', zfact 118 127 ENDIF 119 128 END DO … … 123 132 ALLOCATE( sf_trcdta(nb_trcdta), rf_trfac(nb_trcdta), STAT=ierr1 ) 124 133 IF( ierr1 > 0 ) THEN 125 CALL ctl_stop( 'trc_dta_ini : unable to allocate sf_trcdta structure' ) ; RETURN134 CALL ctl_stop( 'trc_dta_init: unable to allocate sf_trcdta structure' ) ; RETURN 126 135 ENDIF 127 136 ! … … 134 143 IF( sn_trcdta(jn)%ln_tint ) ALLOCATE( sf_trcdta(jl)%fdta(jpi,jpj,jpk,2) , STAT=ierr3 ) 135 144 IF( ierr2 + ierr3 > 0 ) THEN 136 CALL ctl_stop( 'trc_dta : unable to allocate passive tracer data arrays' ) ; RETURN145 CALL ctl_stop( 'trc_dta_init : unable to allocate passive tracer data arrays' ) ; RETURN 137 146 ENDIF 138 147 ENDIF … … 140 149 ENDDO 141 150 ! ! fill sf_trcdta with slf_i and control print 142 CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta ', 'Passive tracer data', 'namtrc' )151 CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta_init', 'Passive tracer data', 'namtrc' ) 143 152 ! 144 153 ENDIF … … 222 231 sf_dta(1)%fnow(ji,jj,ik) = (1.-zl) * sf_dta(1)%fnow(ji,jj,ik) + zl * sf_dta(1)%fnow(ji,jj,ik-1) 223 232 ENDIF 224 ik = mikt(ji,jj)225 IF( ik > 1 ) THEN226 zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) )227 sf_dta(1)%fnow(ji,jj,ik) = (1.-zl) * sf_dta(1)%fnow(ji,jj,ik) + zl * sf_dta(1)%fnow(ji,jj,ik+1)228 ENDIF229 233 END DO 230 234 END DO -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r6069 r6108 26 26 USE sbc_oce 27 27 USE trcice ! tracers in sea ice 28 USE trcbc, only : trc_bc_init ! generalized Boundary Conditions 28 29 29 30 IMPLICIT NONE … … 206 207 !!---------------------------------------------------------------------- 207 208 ! 209 ! Initialisation of tracers Initial Conditions 208 210 IF( ln_trcdta ) CALL trc_dta_init(jptra) 211 212 ! Initialisation of tracers Boundary Conditions 213 IF( lk_my_trc ) CALL trc_bc_init(jptra) 209 214 210 215 IF( ln_rsttr ) THEN … … 250 255 !! ** Purpose : Allocate all the dynamic arrays of the OPA modules 251 256 !!---------------------------------------------------------------------- 252 USE trcadv , ONLY: trc_adv_alloc ! TOP-related alloc routines...253 257 USE trc , ONLY: trc_alloc 254 USE trcnxt , ONLY: trc_nxt_alloc255 USE trczdf , ONLY: trc_zdf_alloc256 258 USE trdtrc_oce , ONLY: trd_trc_oce_alloc 257 259 #if defined key_trdmxl_trc … … 262 264 !!---------------------------------------------------------------------- 263 265 ! 264 ierr = trc_adv_alloc() ! Start of TOP-related alloc routines... 265 ierr = ierr + trc_alloc () 266 ierr = ierr + trc_nxt_alloc() 267 ierr = ierr + trc_zdf_alloc() 266 ierr = trc_alloc() 268 267 ierr = ierr + trd_trc_oce_alloc() 269 268 #if defined key_trdmxl_trc -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r5836 r6108 98 98 99 99 100 rdttrc (:) = rdttra(:) * FLOAT( nn_dttrc ) ! vertical profile ofpassive tracer time-step100 rdttrc = rdt * FLOAT( nn_dttrc ) ! passive tracer time-step 101 101 102 102 IF(lwp) THEN ! control print 103 103 WRITE(numout,*) 104 WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc (1)104 WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc 105 105 WRITE(numout,*) 106 106 ENDIF … … 173 173 !!--------------------------------------------------------------------- 174 174 ! 175 IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists'175 IF(lwp) WRITE(numout,*) 'trc_nam_run : read the passive tracer namelists' 176 176 IF(lwp) WRITE(numout,*) '~~~~~~~' 177 177 … … 271 271 TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput 272 272 !! 273 NAMELIST/namtrc/ sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo273 NAMELIST/namtrc/ sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo 274 274 !!--------------------------------------------------------------------- 275 275 IF(lwp) WRITE(numout,*) 276 IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists'276 IF(lwp) WRITE(numout,*) 'trc_nam_trc : read the passive tracer namelists' 277 277 IF(lwp) WRITE(numout,*) '~~~~~~~' 278 278 … … 291 291 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) 292 292 ln_trc_ini(jn) = sn_tracer(jn)%llinit 293 #if defined key_my_trc 294 ln_trc_sbc(jn) = sn_tracer(jn)%llsbc 295 ln_trc_cbc(jn) = sn_tracer(jn)%llcbc 296 ln_trc_obc(jn) = sn_tracer(jn)%llobc 297 #endif 293 298 ln_trc_wri(jn) = sn_tracer(jn)%llsave 294 299 END DO … … 317 322 NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio 318 323 !!--------------------------------------------------------------------- 319 320 IF(lwp) WRITE(numout,*)321 IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options'322 IF(lwp) WRITE(numout,*) '~~~~~~~'323 324 324 325 IF(lwp) WRITE(numout,*) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r6060 r6108 130 130 !!---------------------------------------------------------------------- 131 131 ! 132 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc (1) ) ! surfacepassive tracer time step132 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc ) ! passive tracer time step 133 133 ! prognostic variables 134 134 ! -------------------- … … 198 198 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 199 199 200 IF ( jprstlib == jprstdimg ) THEN201 ! eventually read netcdf file (monobloc) for restarting on different number of processors202 ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90203 INQUIRE( FILE = TRIM(cn_trcrst_indir)//'/'//TRIM(cn_trcrst_in)//'.nc', EXIST = llok )204 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF205 ENDIF206 207 200 IF( ln_rsttr ) THEN 208 201 CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt ) … … 234 227 ELSE 235 228 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam 236 adatrj = ( REAL( nittrc000-1, wp ) * rdt tra(1)) / rday229 adatrj = ( REAL( nittrc000-1, wp ) * rdt ) / rday 237 230 ! note this is wrong if time step has changed during run 238 231 ENDIF -
branches/2015/dev_merge_2015/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90
r2455 r6108 411 411 ENDIF 412 412 ! 413 CASE('nfice','nfbulk','kt','ndastp','adatrj','rdt' ,'rdttra1')413 CASE('nfice','nfbulk','kt','ndastp','adatrj','rdt') 414 414 IF(.NOT. dimg ) THEN 415 415 WRITE(*,*) 'copy ',TRIM(Ncdf_varname(i)) … … 417 417 CALL Read_Ncdf_var(TRIM(Ncdf_varname(i)),TRIM(restart_file),tabtemp0dreal) 418 418 SELECT CASE (TRIM(Ncdf_varname(i))) 419 CASE('rdt' ,'rdttra1')419 CASE('rdt') 420 420 tabtemp0dreal = tabtemp0dreal/rhot 421 421 CASE('kt') -
branches/2015/dev_merge_2015/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90
r3000 r6108 37 37 INTEGER :: nn_write = 10 !: model standard output frequency 38 38 INTEGER :: nn_stock = 10 !: restart file frequency 39 LOGICAL :: ln_dimgnnn = .FALSE. !: type of dimgout. (F): 1 file for all proc40 !: (T): 1 file per proc41 39 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 42 40 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file -
branches/2015/dev_merge_2015/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg
r5617 r6108 43 43 kt | | | | | | 44 44 rdt | | | | | | 45 rdttra1 | | | | | |46 45 utau_b | | XY | U | | |surface_downward_eastward_stress 47 46 vtau_b | | XY | V | | |surface_downward_northward_stress
Note: See TracChangeset
for help on using the changeset viewer.