Changeset 3104 for branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM
- Timestamp:
- 2011-11-15T11:08:25+01:00 (13 years ago)
- Location:
- branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM
- Files:
-
- 26 edited
- 11 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/GYRE/EXP00/iodef.xml
r2561 r3104 206 206 </group> 207 207 208 <!-- variables available with key_float --> 209 <group id="floatvar" axis_ref="nfloat" grid_ref="scalarpoint" zoom_ref="1point"> 210 <field id="traj_lon" description="floats longitude" unit="deg" operation="inst(X)" /> 211 <field id="traj_lat" description="floats latitude" unit="deg" /> 212 <field id="traj_dep" description="floats depth" unit="m" /> 213 <field id="traj_temp" description="floats temperature" unit="degC" /> 214 <field id="traj_salt" description="floats salinity" unit="psu" /> 215 <field id="traj_dens" description="floats density" unit="kg/m3" /> 216 <field id="traj_group" description="floats group" unit="none" /> 217 </group> 218 219 208 220 </field_definition> 209 221 … … 286 298 </file> 287 299 300 <!-- variables available with key_float, instantaneous fields --> 301 <file id="floats" description="floats variables"> 302 <field ref="traj_lon" name="floats_longitude" freq_op="432000" /> 303 <field ref="traj_lat" name="floats_latitude" freq_op="432000" /> 304 <field ref="traj_dep" name="floats_depth" freq_op="432000" /> 305 <field ref="traj_temp" name="floats_temperature" freq_op="432000" /> 306 <field ref="traj_salt" name="floats_salinity" freq_op="432000" /> 307 <field ref="traj_dens" name="floats_density" freq_op="432000" /> 308 <field ref="traj_group" name="floats_group" freq_op="432000" /> 309 </file> 310 288 311 </group> 289 312 … … 330 353 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 331 354 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 355 <axis id="nfloat" description="Number of float" unit="no unit" positive=".false." /> 332 356 <axis id="none" description="axe non defini" unit="none" size="1" /> 333 357 </axis_definition> -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/GYRE/EXP00/namelist
r3097 r3104 130 130 ln_blk_clio = .false. ! CLIO bulk formulation (T => fill namsbc_clio) 131 131 ln_blk_core = .false. ! CORE bulk formulation (T => fill namsbc_core) 132 ln_blk_ecmwf= .false. ! MFS bulk formulation (T => fill namsbc_ecmwf) 132 133 ln_cpl = .false. ! Coupled formulation (T => fill namsbc_cpl ) 133 134 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr ) … … 142 143 ! =2 annual global mean of e-p-r set to zero 143 144 ! =3 global emp set to zero and spread out over erp area 145 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 144 146 / 145 147 !----------------------------------------------------------------------- … … 200 202 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 201 203 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 204 / 205 !----------------------------------------------------------------------- 206 &namsbc_ecmwf ! namsbc_ecmwf MFS bulk formulea 207 !----------------------------------------------------------------------- 208 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 209 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 210 sn_wndi = 'ecmwf' , 6 , 'u10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 211 sn_wndj = 'ecmwf' , 6 , 'v10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 212 sn_clc = 'ecmwf' , 6 , 'clc' , .true. , .false. , 'daily' ,'bilinear.nc', '' 213 sn_msl = 'ecmwf' , 6 , 'msl' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 214 sn_tair = 'ecmwf' , 6 , 't2' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 215 sn_rhm = 'ecmwf' , 6 , 'rh' , .true. , .false. , 'daily' ,'bilinear.nc', '' 216 sn_prec = 'ecmwf' , 6 , 'precip' , .true. , .true. , 'daily' ,'bicubic.nc' , '' 217 218 cn_dir = './ECMWF/' ! root directory for the location of the bulk files 202 219 / 203 220 !----------------------------------------------------------------------- … … 360 377 / 361 378 !----------------------------------------------------------------------- 379 ! nam_tide tide parameters (#ifdef key_tide) 380 !----------------------------------------------------------------------- 381 ! ln_tide_pot = use tidal potential forcing 382 ! nb_harmo = number of constituents used 383 ! name(1) = 'M2', 'K1', etc name of constituent 384 385 &nam_tide 386 ln_tide_pot = .true. 387 nb_harmo = 11 388 clname(1) = 'M2' 389 clname(2) = 'S2' 390 clname(3) = 'N2' 391 clname(4) = 'K1' 392 clname(5) = 'O1' 393 clname(6) = 'Q1' 394 clname(7) = 'M4' 395 clname(8) = 'K2' 396 clname(9) = 'P1' 397 clname(10) = 'Mf' 398 clname(11) = 'Mm' 399 / 400 !----------------------------------------------------------------------- 362 401 &nambdy ! unstructured open boundaries ("key_bdy") 363 402 !----------------------------------------------------------------------- … … 586 625 rn_alp = 5. ! coefficient of the parameterization 587 626 nn_ric = 2 ! coefficient of the parameterization 627 rn_ekmfc = 0.7 ! Factor in the Ekman depth Equation 628 rn_mldmin = 1.0 ! minimum allowable mixed-layer depth estimate (m) 629 rn_mldmax =1000.0 ! maximum allowable mixed-layer depth estimate (m) 630 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer 631 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer 632 ln_mldw = .true. ! Flag to use or not the mized layer depth param. 588 633 / 589 634 !----------------------------------------------------------------------- … … 744 789 &namflo ! float parameters ("key_float") 745 790 !----------------------------------------------------------------------- 746 ln_rstflo = .false. ! float restart (T) or not (F) 747 nn_writefl = 75 ! frequency of writing in float output file 748 nn_stockfl = 5475 ! frequency of creation of the float restart file 749 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 750 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 751 ! or computed with Blanke' scheme (F) 791 jpnfl = 1 ! total number of floats during the run 792 jpnnewflo = 0 ! number of floats for the restart 793 ln_rstflo = .false. ! float restart (T) or not (F) 794 nn_writefl = 75 ! frequency of writing in float output file 795 nn_stockfl = 5475 ! frequency of creation of the float restart file 796 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 797 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 798 ! or computed with Blanke' scheme (F) 799 ln_ariane = .true. ! Input with Ariane tool convention(T) 800 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 752 801 / 753 802 !----------------------------------------------------------------------- … … 767 816 ln_diahsb = .false. ! check the heat and salt budgets (T) or not (F) 768 817 / 818 !----------------------------------------------------------------------- 819 &namdct ! transports through sections 820 !----------------------------------------------------------------------- 821 nn_dct = 60 ! time step frequency for transports computing 822 nn_dctwri = 60 ! time step frequency for transports writing 823 nn_secdebug = 0 ! 0 : no section to debug 824 ! -1 : debug all section 825 ! 0 < n : debug section number n 826 / 769 827 770 828 !!====================================================================== … … 858 916 nn_divdmp = 0 ! Number of iterations of divergence damping operator 859 917 / 918 !----------------------------------------------------------------------- 919 &namsbc_wave ! External fields from wave model 920 !----------------------------------------------------------------------- 921 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 922 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 923 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 924 ! 925 cn_dir_cdg = './' ! root directory for the location of drag coefficient files 926 / -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/GYRE_LOBSTER/EXP00/iodef.xml
r2561 r3104 206 206 </group> 207 207 208 <!-- variables available with key_float --> 209 <group id="floatvar" axis_ref="nfloat" grid_ref="scalarpoint" zoom_ref="1point"> 210 <field id="traj_lon" description="floats longitude" unit="deg" operation="inst(X)" /> 211 <field id="traj_lat" description="floats latitude" unit="deg" /> 212 <field id="traj_dep" description="floats depth" unit="m" /> 213 <field id="traj_temp" description="floats temperature" unit="degC" /> 214 <field id="traj_salt" description="floats salinity" unit="psu" /> 215 <field id="traj_dens" description="floats density" unit="kg/m3" /> 216 <field id="traj_group" description="floats group" unit="none" /> 217 </group> 218 219 208 220 <!-- ptrc on T grid --> 209 221 … … 325 337 <field ref="aht2d_eiv" name="soleaeiw" /> 326 338 </file> 327 339 340 <!-- variables available with key_float, instantaneous fields --> 341 <file id="floats" description="floats variables"> 342 <field ref="traj_lon" name="floats_longitude" freq_op="432000" /> 343 <field ref="traj_lat" name="floats_latitude" freq_op="432000" /> 344 <field ref="traj_dep" name="floats_depth" freq_op="432000" /> 345 <field ref="traj_temp" name="floats_temperature" freq_op="432000" /> 346 <field ref="traj_salt" name="floats_salinity" freq_op="432000" /> 347 <field ref="traj_dens" name="floats_density" freq_op="432000" /> 348 <field ref="traj_group" name="floats_group" freq_op="432000" /> 349 </file> 350 328 351 <file id="5d_ptrc_T" name="auto" description="lobster sms variables" > 329 352 <field ref="DET" /> … … 404 427 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 405 428 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 429 <axis id="nfloat" description="Number of float" unit="no unit" positive=".false." /> 406 430 <axis id="none" description="axe non defini" unit="none" size="1" /> 407 431 </axis_definition> -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist
r2735 r3104 755 755 &namflo ! float parameters ("key_float") 756 756 !----------------------------------------------------------------------- 757 ln_rstflo = .false. ! float restart (T) or not (F) 758 nn_writefl = 75 ! frequency of writing in float output file 759 nn_stockfl = 5475 ! frequency of creation of the float restart file 760 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 761 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 762 ! or computed with Blanke' scheme (F) 757 jpnfl = 1 ! total number of floats during the run 758 jpnnewflo = 0 ! number of floats for the restart 759 ln_rstflo = .false. ! float restart (T) or not (F) 760 nn_writefl = 75 ! frequency of writing in float output file 761 nn_stockfl = 5475 ! frequency of creation of the float restart file 762 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 763 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 764 ! or computed with Blanke' scheme (F) 765 ln_ariane = .true. ! Input with Ariane tool convention(T) 766 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 763 767 / 764 768 !----------------------------------------------------------------------- -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml
r2729 r3104 129 129 <field id="ticemel_cea" description="Rate of Melt at Upper Surface of Sea Ice (cell average)" unit="kg/m2/s" /> 130 130 131 132 <!-- tidal composante --> 133 <field id="M2x" description="M2 Elevation harmonic real part " unit="m" /> 134 <field id="M2y" description="M2 Elevation harmonic imaginary part" unit="m" /> 135 <field id="S2x" description="M2 Elevation harmonic real part " unit="m" /> 136 <field id="S2y" description="M2 Elevation harmonic imaginary part" unit="m" /> 137 <field id="N2x" description="M2 Elevation harmonic real part " unit="m" /> 138 <field id="N2y" description="M2 Elevation harmonic imaginary part" unit="m" /> 139 <field id="K1x" description="M2 Elevation harmonic real part " unit="m" /> 140 <field id="K1y" description="M2 Elevation harmonic imaginary part" unit="m" /> 141 <field id="O1x" description="M2 Elevation harmonic real part " unit="m" /> 142 <field id="O1y" description="M2 Elevation harmonic imaginary part" unit="m" /> 143 <field id="Q1x" description="M2 Elevation harmonic real part " unit="m" /> 144 <field id="Q1y" description="M2 Elevation harmonic imaginary part" unit="m" /> 145 <field id="M4x" description="M2 Elevation harmonic real part " unit="m" /> 146 <field id="M4y" description="M2 Elevation harmonic imaginary part" unit="m" /> 147 <field id="K2x" description="M2 Elevation harmonic real part " unit="m" /> 148 <field id="K2y" description="M2 Elevation harmonic imaginary part" unit="m" /> 149 <field id="P1x" description="M2 Elevation harmonic real part " unit="m" /> 150 <field id="P1y" description="M2 Elevation harmonic imaginary part" unit="m" /> 151 <field id="Mfx" description="M2 Elevation harmonic real part " unit="m" /> 152 <field id="Mfy" description="M2 Elevation harmonic imaginary part" unit="m" /> 153 <field id="Mmx" description="M2 Elevation harmonic real part " unit="m" /> 154 <field id="Mmy" description="M2 Elevation harmonic imaginary part" unit="m" /> 155 156 <field id="M2x_u" description="M2 current barotrope along i-axis harmonic real part " unit="m/s" /> 157 <field id="M2y_u" description="M2 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 158 <field id="S2x_u" description="S2 current barotrope along i-axis harmonic real part " unit="m/s" /> 159 <field id="S2y_u" description="S2 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 160 <field id="N2x_u" description="N2 current barotrope along i-axis harmonic real part " unit="m/s" /> 161 <field id="N2y_u" description="N2 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 162 <field id="K1x_u" description="K1 current barotrope along i-axis harmonic real part " unit="m/s" /> 163 <field id="K1y_u" description="K1 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 164 <field id="O1x_u" description="O1 current barotrope along i-axis harmonic real part " unit="m/s" /> 165 <field id="O1y_u" description="O1 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 166 <field id="Q1x_u" description="Q1 current barotrope along i-axis harmonic real part " unit="m/s" /> 167 <field id="Q1y_u" description="Q1 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 168 <field id="M4x_u" description="M4 current barotrope along i-axis harmonic real part " unit="m/s" /> 169 <field id="M4y_u" description="M4 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 170 <field id="K2x_u" description="K2 current barotrope along i-axis harmonic real part " unit="m/s" /> 171 <field id="K2y_u" description="K2 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 172 <field id="P1x_u" description="P1 current barotrope along i-axis harmonic real part " unit="m/s" /> 173 <field id="P1y_u" description="P1 current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 174 <field id="Mfx_u" description="Mf current barotrope along i-axis harmonic real part " unit="m/s" /> 175 <field id="Mfy_u" description="Mf current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 176 <field id="Mmx_u" description="Mm current barotrope along i-axis harmonic real part " unit="m/s" /> 177 <field id="Mmy_u" description="Mm current barotrope along i-axis harmonic imaginary part " unit="m/s" /> 178 179 <field id="M2x_v" description="M2 current barotrope along j-axis harmonic real part " unit="m/s" /> 180 <field id="M2y_v" description="M2 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 181 <field id="S2x_v" description="S2 current barotrope along j-axis harmonic real part " unit="m/s" /> 182 <field id="S2y_v" description="S2 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 183 <field id="N2x_v" description="N2 current barotrope along j-axis harmonic real part " unit="m/s" /> 184 <field id="N2y_v" description="N2 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 185 <field id="K1x_v" description="K1 current barotrope along j-axis harmonic real part " unit="m/s" /> 186 <field id="K1y_v" description="K1 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 187 <field id="O1x_v" description="O1 current barotrope along j-axis harmonic real part " unit="m/s" /> 188 <field id="O1y_v" description="O1 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 189 <field id="Q1x_v" description="Q1 current barotrope along j-axis harmonic real part " unit="m/s" /> 190 <field id="Q1y_v" description="Q1 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 191 <field id="M4x_v" description="M4 current barotrope along j-axis harmonic real part " unit="m/s" /> 192 <field id="M4y_v" description="M4 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 193 <field id="K2x_v" description="K2 current barotrope along j-axis harmonic real part " unit="m/s" /> 194 <field id="K2y_v" description="K2 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 195 <field id="P1x_v" description="P1 current barotrope along j-axis harmonic real part " unit="m/s" /> 196 <field id="P1y_v" description="P1 current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 197 <field id="Mfx_v" description="Mf current barotrope along j-axis harmonic real part " unit="m/s" /> 198 <field id="Mfy_v" description="Mf current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 199 <field id="Mmx_v" description="Mm current barotrope along j-axis harmonic real part " unit="m/s" /> 200 <field id="Mmy_v" description="Mm current barotrope along j-axis harmonic imaginary part " unit="m/s" /> 131 201 </group> 132 202 … … 206 276 </group> 207 277 278 279 <!-- variables available with key_float --> 280 <group id="floatvar" axis_ref="nfloat" grid_ref="scalarpoint" zoom_ref="1point"> 281 <field id="traj_lon" description="floats longitude" unit="deg" operation="inst(X)" /> 282 <field id="traj_lat" description="floats latitude" unit="deg" operation="inst(X)" /> 283 <field id="traj_dep" description="floats depth" unit="m" operation="inst(X)" /> 284 <field id="traj_temp" description="floats temperature" unit="degC" operation="inst(X)" /> 285 <field id="traj_salt" description="floats salinity" unit="psu" operation="inst(X)" /> 286 <field id="traj_dens" description="floats density" unit="kg/m3" operation="inst(X)" /> 287 <field id="traj_group" description="floats group" unit="none" operation="inst(X)" /> 288 </group> 289 208 290 </field_definition> 209 291 210 292 <!-- 211 293 ============================================================================================================ … … 261 343 <field ref="sst" name="sst_1d_ave" /> <!-- mean --> 262 344 <field ref="sst" name="sst_1d_max" operation="t_max(X)" /> <!-- max --> 345 <field ref="M2x" name="M2_x_elev" /> 346 <field ref="M2y" name="M2_y_elev" /> 263 347 </file> 264 348 </group> 349 350 <!-- variables available with key_float, instantaneous fields --> 351 <file id="floats" description="floats variables"> 352 <field ref="traj_lon" name="floats_longitude" freq_op="86400" /> 353 <field ref="traj_lat" name="floats_latitude" freq_op="86400" /> 354 <field ref="traj_dep" name="floats_depth" freq_op="86400" /> 355 <field ref="traj_temp" name="floats_temperature" freq_op="86400" /> 356 <field ref="traj_salt" name="floats_salinity" freq_op="86400" /> 357 <field ref="traj_dens" name="floats_density" freq_op="86400" /> 358 <field ref="traj_group" name="floats_group" freq_op="86400" /> 359 </file> 265 360 266 361 </group> … … 384 479 385 480 <axis_definition> 386 <axis id="deptht" description="Vertical T levels" unit="m" positive=".false." /> 387 <axis id="depthu" description="Vertical U levels" unit="m" positive=".false." /> 388 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 389 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 481 <axis id="deptht" description="Vertical T levels" unit="m" positive=".false." /> 482 <axis id="depthu" description="Vertical U levels" unit="m" positive=".false." /> 483 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 484 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 485 <axis id="nfloat" description="Number of float" unit="no unit" positive=".false." /> 390 486 <axis id="none" description="axe non defini" unit="none" size="1" /> 391 487 </axis_definition> -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist
r3097 r3104 130 130 ln_blk_clio = .false. ! CLIO bulk formulation (T => fill namsbc_clio) 131 131 ln_blk_core = .true. ! CORE bulk formulation (T => fill namsbc_core) 132 ln_blk_ecmwf= .false. ! MFS bulk formulation (T => fill namsbc_ecmwf) 132 133 ln_cpl = .false. ! Coupled formulation (T => fill namsbc_cpl ) 133 134 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr ) … … 142 143 ! =2 annual global mean of e-p-r set to zero 143 144 ! =3 global emp set to zero and spread out over erp area 145 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 144 146 / 145 147 !----------------------------------------------------------------------- … … 200 202 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 201 203 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 204 / 205 !----------------------------------------------------------------------- 206 &namsbc_ecmwf ! namsbc_ecmwf MFS bulk formulea 207 !----------------------------------------------------------------------- 208 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 209 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 210 sn_wndi = 'ecmwf' , 6 , 'u10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 211 sn_wndj = 'ecmwf' , 6 , 'v10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 212 sn_clc = 'ecmwf' , 6 , 'clc' , .true. , .false. , 'daily' ,'bilinear.nc', '' 213 sn_msl = 'ecmwf' , 6 , 'msl' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 214 sn_tair = 'ecmwf' , 6 , 't2' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 215 sn_rhm = 'ecmwf' , 6 , 'rh' , .true. , .false. , 'daily' ,'bilinear.nc', '' 216 sn_prec = 'ecmwf' , 6 , 'precip' , .true. , .true. , 'daily' ,'bicubic.nc' , '' 217 218 cn_dir = './ECMWF/' ! root directory for the location of the bulk files 202 219 / 203 220 !----------------------------------------------------------------------- … … 360 377 / 361 378 !----------------------------------------------------------------------- 379 &nam_tide ! tide parameters (#ifdef key_tide) 380 !----------------------------------------------------------------------- 381 ln_tide_pot = .true. ! use tidal potential forcing 382 nb_harmo = 11 ! number of constituents used 383 clname(1) = 'M2' ! name of constituent 384 clname(2) = 'S2' 385 clname(3) = 'N2' 386 clname(4) = 'K1' 387 clname(5) = 'O1' 388 clname(6) = 'Q1' 389 clname(7) = 'M4' 390 clname(8) = 'K2' 391 clname(9) = 'P1' 392 clname(10) = 'Mf' 393 clname(11) = 'Mm' 394 / 395 !----------------------------------------------------------------------- 362 396 &nambdy ! unstructured open boundaries ("key_bdy") 363 397 !----------------------------------------------------------------------- … … 586 620 rn_alp = 5. ! coefficient of the parameterization 587 621 nn_ric = 2 ! coefficient of the parameterization 622 rn_ekmfc = 0.7 ! Factor in the Ekman depth Equation 623 rn_mldmin = 1.0 ! minimum allowable mixed-layer depth estimate (m) 624 rn_mldmax =1000.0 ! maximum allowable mixed-layer depth estimate (m) 625 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer 626 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer 627 ln_mldw = .true. ! Flag to use or not the mized layer depth param. 588 628 / 589 629 !----------------------------------------------------------------------- … … 744 784 &namflo ! float parameters ("key_float") 745 785 !----------------------------------------------------------------------- 746 ln_rstflo = .false. ! float restart (T) or not (F) 747 nn_writefl = 75 ! frequency of writing in float output file 748 nn_stockfl = 5475 ! frequency of creation of the float restart file 749 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 750 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 751 ! or computed with Blanke' scheme (F) 786 jpnfl = 1 ! total number of floats during the run 787 jpnnewflo = 0 ! number of floats for the restart 788 ln_rstflo = .false. ! float restart (T) or not (F) 789 nn_writefl = 75 ! frequency of writing in float output file 790 nn_stockfl = 5475 ! frequency of creation of the float restart file 791 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 792 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 793 ! or computed with Blanke' scheme (F) 794 ln_ariane = .true. ! Input with Ariane tool convention(T) 795 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 752 796 / 753 797 !----------------------------------------------------------------------- … … 766 810 !----------------------------------------------------------------------- 767 811 ln_diahsb = .false. ! check the heat and salt budgets (T) or not (F) 812 / 813 !----------------------------------------------------------------------- 814 &nam_diaharm ! Harmonic analysis of tidal constituents ('key_diaharm') 815 !----------------------------------------------------------------------- 816 nit000_han = 1 ! First time step used for harmonic analysis 817 nitend_han = 75 ! Last time step used for harmonic analysis 818 nstep_han = 15 ! Time step frequency for harmonic analysis 819 nb_ana = 2 ! Number of harmonics to analyse 820 tname(1) = 'M2' ! Name of tidal constituents 821 tname(2) = 'K1' 822 / 823 !----------------------------------------------------------------------- 824 &namdct ! transports through sections 825 !----------------------------------------------------------------------- 826 nn_dct = 15 ! time step frequency for transports computing 827 nn_dctwri = 15 ! time step frequency for transports writing 828 nn_secdebug = 112 ! 0 : no section to debug 829 ! -1 : debug all section 830 ! 0 < n : debug section number n 768 831 / 769 832 … … 858 921 nn_divdmp = 0 ! Number of iterations of divergence damping operator 859 922 / 923 !----------------------------------------------------------------------- 924 &namsbc_wave ! External fields from wave model 925 !----------------------------------------------------------------------- 926 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 927 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 928 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 929 ! 930 cn_dir_cdg = './' ! root directory for the location of drag coefficient files 931 / -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml
r2561 r3104 205 205 <field id="fram_trans" description="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" /> 206 206 </group> 207 207 208 <!-- variables available with key_float --> 209 <group id="floatvar" axis_ref="nfloat" grid_ref="scalarpoint" zoom_ref="1point"> 210 <field id="traj_lon" description="floats longitude" unit="deg" operation="inst(X)" /> 211 <field id="traj_lat" description="floats latitude" unit="deg" /> 212 <field id="traj_dep" description="floats depth" unit="m" /> 213 <field id="traj_temp" description="floats temperature" unit="degC" /> 214 <field id="traj_salt" description="floats salinity" unit="psu" /> 215 <field id="traj_dens" description="floats density" unit="kg/m3" /> 216 <field id="traj_group" description="floats group" unit="none" /> 217 </group> 218 208 219 <!-- ptrc on T grid --> 209 220 … … 378 389 <field ref="aht2d_eiv" name="soleaeiw" /> 379 390 </file> 380 391 392 381 393 <file id="5d_icemod" name="auto" description="ice variables" > 382 394 <field ref="ice_pres" /> … … 394 406 <field ref="snowpre" name="isnowpre" /> 395 407 </file> 408 409 <!-- variables available with key_float, instantaneous fields --> 410 <file id="floats" description="floats variables"> 411 <field ref="traj_lon" name="floats_longitude" freq_op="432000" /> 412 <field ref="traj_lat" name="floats_latitude" freq_op="432000" /> 413 <field ref="traj_dep" name="floats_depth" freq_op="432000" /> 414 <field ref="traj_temp" name="floats_temperature" freq_op="432000" /> 415 <field ref="traj_salt" name="floats_salinity" freq_op="432000" /> 416 <field ref="traj_dens" name="floats_density" freq_op="432000" /> 417 <field ref="traj_group" name="floats_group" freq_op="432000" /> 418 </file> 396 419 397 420 <file id="5d_diad_T" name="auto" description="additional pisces diagnostics" > … … 523 546 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 524 547 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 548 <axis id="nfloat" description="Number of float" unit="no unit" positive=".false." /> 525 549 <axis id="none" description="axe non defini" unit="none" size="1" /> 526 550 </axis_definition> -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist
r3097 r3104 130 130 ln_blk_clio = .false. ! CLIO bulk formulation (T => fill namsbc_clio) 131 131 ln_blk_core = .true. ! CORE bulk formulation (T => fill namsbc_core) 132 ln_blk_ecmwf= .false. ! MFS bulk formulation (T => fill namsbc_ecmwf) 132 133 ln_cpl = .false. ! Coupled formulation (T => fill namsbc_cpl ) 133 134 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr ) … … 142 143 ! =2 annual global mean of e-p-r set to zero 143 144 ! =3 global emp set to zero and spread out over erp area 145 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave ) 144 146 / 145 147 !----------------------------------------------------------------------- … … 200 202 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 201 203 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 204 / 205 !----------------------------------------------------------------------- 206 &namsbc_ecmwf ! namsbc_ecmwf MFS bulk formulea 207 !----------------------------------------------------------------------- 208 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 209 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 210 sn_wndi = 'ecmwf' , 6 , 'u10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 211 sn_wndj = 'ecmwf' , 6 , 'v10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 212 sn_clc = 'ecmwf' , 6 , 'clc' , .true. , .false. , 'daily' ,'bilinear.nc', '' 213 sn_msl = 'ecmwf' , 6 , 'msl' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 214 sn_tair = 'ecmwf' , 6 , 't2' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 215 sn_rhm = 'ecmwf' , 6 , 'rh' , .true. , .false. , 'daily' ,'bilinear.nc', '' 216 sn_prec = 'ecmwf' , 6 , 'precip' , .true. , .true. , 'daily' ,'bicubic.nc' , '' 217 218 cn_dir = './ECMWF/' ! root directory for the location of the bulk files 202 219 / 203 220 !----------------------------------------------------------------------- … … 610 627 rn_alp = 5. ! coefficient of the parameterization 611 628 nn_ric = 2 ! coefficient of the parameterization 629 rn_ekmfc = 0.7 ! Factor in the Ekman depth Equation 630 rn_mldmin = 1.0 ! minimum allowable mixed-layer depth estimate (m) 631 rn_mldmax =1000.0 ! maximum allowable mixed-layer depth estimate (m) 632 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer 633 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer 634 ln_mldw = .true. ! Flag to use or not the mized layer depth param. 612 635 / 613 636 !----------------------------------------------------------------------- … … 768 791 &namflo ! float parameters ("key_float") 769 792 !----------------------------------------------------------------------- 770 ln_rstflo = .false. ! float restart (T) or not (F) 771 nn_writefl = 75 ! frequency of writing in float output file 772 nn_stockfl = 5475 ! frequency of creation of the float restart file 773 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 774 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 775 ! or computed with Blanke' scheme (F) 793 jpnfl = 1 ! total number of floats during the run 794 jpnnewflo = 0 ! number of floats for the restart 795 ln_rstflo = .false. ! float restart (T) or not (F) 796 nn_writefl = 75 ! frequency of writing in float output file 797 nn_stockfl = 5475 ! frequency of creation of the float restart file 798 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 799 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 800 ! or computed with Blanke' scheme (F) 801 ln_ariane = .true. ! Input with Ariane tool convention(T) 802 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 776 803 / 777 804 !----------------------------------------------------------------------- … … 790 817 !----------------------------------------------------------------------- 791 818 ln_diahsb = .false. ! check the heat and salt budgets (T) or not (F) 819 / 820 !----------------------------------------------------------------------- 821 &namdct ! transports through sections 822 !----------------------------------------------------------------------- 823 nn_dct = 15 ! time step frequency for transports computing 824 nn_dctwri = 15 ! time step frequency for transports writing 825 nn_secdebug = 112 ! 0 : no section to debug 826 ! -1 : debug all section 827 ! 0 < n : debug section number n 792 828 / 793 829 … … 882 918 nn_divdmp = 0 ! Number of iterations of divergence damping operator 883 919 / 920 !----------------------------------------------------------------------- 921 &namsbc_wave ! External fields from wave model 922 !----------------------------------------------------------------------- 923 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 924 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 925 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 926 ! 927 cn_dir_cdg = './' ! root directory for the location of drag coefficient files 928 / -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/POMME/EXP00/iodef.xml
r2561 r3104 204 204 <field id="saltot" description="global mean salinity" unit="psu" /> 205 205 <field id="fram_trans" description="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" /> 206 </group> 207 208 <!-- variables available with key_float --> 209 <group id="floatvar" axis_ref="nfloat" grid_ref="scalarpoint" zoom_ref="1point"> 210 <field id="traj_lon" description="floats longitude" unit="deg" operation="inst(X)" /> 211 <field id="traj_lat" description="floats latitude" unit="deg" /> 212 <field id="traj_dep" description="floats depth" unit="m" /> 213 <field id="traj_temp" description="floats temperature" unit="degC" /> 214 <field id="traj_salt" description="floats salinity" unit="psu" /> 215 <field id="traj_dens" description="floats density" unit="kg/m3" /> 216 <field id="traj_group" description="floats group" unit="none" /> 206 217 </group> 207 218 … … 263 274 </file> 264 275 276 <!-- variables available with key_float, instantaneous fields --> 277 <file id="floats" description="floats variables"> 278 <field ref="traj_lon" name="floats_longitude" freq_op="432000" /> 279 <field ref="traj_lat" name="floats_latitude" freq_op="432000" /> 280 <field ref="traj_dep" name="floats_depth" freq_op="432000" /> 281 <field ref="traj_temp" name="floats_temperature" freq_op="432000" /> 282 <field ref="traj_salt" name="floats_salinity" freq_op="432000" /> 283 <field ref="traj_dens" name="floats_density" freq_op="432000" /> 284 <field ref="traj_group" name="floats_group" freq_op="432000" /> 285 </file> 286 265 287 </file_definition> 266 288 … … 277 299 <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." /> 278 300 <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." /> 301 <axis id="nfloat" description="Number of float" unit="no unit" positive=".false." /> 279 302 <axis id="none" description="axe non defini" unit="none" size="1" /> 280 303 </axis_definition> -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/CONFIG/POMME/EXP00/namelist
r3097 r3104 130 130 ln_blk_clio = .false. ! CLIO bulk formulation (T => fill namsbc_clio) 131 131 ln_blk_core = .true. ! CORE bulk formulation (T => fill namsbc_core) 132 ln_blk_ecmwf= .false. ! MFS bulk formulation (T => fill namsbc_ecmwf) 132 133 ln_cpl = .false. ! Coupled formulation (T => fill namsbc_cpl ) 133 134 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr ) … … 142 143 ! =2 annual global mean of e-p-r set to zero 143 144 ! =3 global emp set to zero and spread out over erp area 145 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 144 146 / 145 147 !----------------------------------------------------------------------- … … 200 202 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 201 203 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 204 / 205 !----------------------------------------------------------------------- 206 &namsbc_ecmwf ! namsbc_ecmwf MFS bulk formulea 207 !----------------------------------------------------------------------- 208 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 209 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 210 sn_wndi = 'ecmwf' , 6 , 'u10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 211 sn_wndj = 'ecmwf' , 6 , 'v10' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 212 sn_clc = 'ecmwf' , 6 , 'clc' , .true. , .false. , 'daily' ,'bilinear.nc', '' 213 sn_msl = 'ecmwf' , 6 , 'msl' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 214 sn_tair = 'ecmwf' , 6 , 't2' , .true. , .false. , 'daily' ,'bicubic.nc' , '' 215 sn_rhm = 'ecmwf' , 6 , 'rh' , .true. , .false. , 'daily' ,'bilinear.nc', '' 216 sn_prec = 'ecmwf' , 6 , 'precip' , .true. , .true. , 'daily' ,'bicubic.nc' , '' 217 218 cn_dir = './ECMWF/' ! root directory for the location of the bulk files 202 219 / 203 220 !----------------------------------------------------------------------- … … 360 377 / 361 378 !----------------------------------------------------------------------- 379 ! nam_tide tide parameters (#ifdef key_tide) 380 !----------------------------------------------------------------------- 381 ! ln_tide_pot = use tidal potential forcing 382 ! nb_harmo = number of constituents used 383 ! name(1) = 'M2', 'K1', etc name of constituent 384 385 &nam_tide 386 ln_tide_pot = .true. 387 nb_harmo = 11 388 clname(1) = 'M2' 389 clname(2) = 'S2' 390 clname(3) = 'N2' 391 clname(4) = 'K1' 392 clname(5) = 'O1' 393 clname(6) = 'Q1' 394 clname(7) = 'M4' 395 clname(8) = 'K2' 396 clname(9) = 'P1' 397 clname(10) = 'Mf' 398 clname(11) = 'Mm' 399 / 400 !----------------------------------------------------------------------- 362 401 &nambdy ! unstructured open boundaries ("key_bdy") 363 402 !----------------------------------------------------------------------- … … 586 625 rn_alp = 5. ! coefficient of the parameterization 587 626 nn_ric = 2 ! coefficient of the parameterization 627 rn_ekmfc = 0.7 ! Factor in the Ekman depth Equation 628 rn_mldmin = 1.0 ! minimum allowable mixed-layer depth estimate (m) 629 rn_mldmax =1000.0 ! maximum allowable mixed-layer depth estimate (m) 630 rn_wtmix = 10.0 ! vertical eddy viscosity coeff [m2/s] in the mixed-layer 631 rn_wvmix = 10.0 ! vertical eddy diffusion coeff [m2/s] in the mixed-layer 632 ln_mldw = .true. ! Flag to use or not the mized layer depth param. 588 633 / 589 634 !----------------------------------------------------------------------- … … 749 794 &namflo ! float parameters ("key_float") 750 795 !----------------------------------------------------------------------- 751 ln_rstflo = .false. ! float restart (T) or not (F) 752 nn_writefl = 75 ! frequency of writing in float output file 753 nn_stockfl = 5475 ! frequency of creation of the float restart file 754 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 755 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 756 ! or computed with Blanke' scheme (F) 796 jpnfl = 1 ! total number of floats during the run 797 jpnnewflo = 0 ! number of floats for the restart 798 ln_rstflo = .false. ! float restart (T) or not (F) 799 nn_writefl = 75 ! frequency of writing in float output file 800 nn_stockfl = 5475 ! frequency of creation of the float restart file 801 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 802 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 803 ! or computed with Blanke' scheme (F) 804 ln_ariane = .true. ! Input with Ariane tool convention(T) 805 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 757 806 / 758 807 !----------------------------------------------------------------------- … … 771 820 !----------------------------------------------------------------------- 772 821 ln_diahsb = .false. ! check the heat and salt budgets (T) or not (F) 822 / 823 !----------------------------------------------------------------------- 824 &namdct ! transports through sections 825 !----------------------------------------------------------------------- 826 nn_dct = 60 ! time step frequency for transports computing 827 nn_dctwri = 60 ! time step frequency for transports writing 828 nn_secdebug = 0 ! 0 : no section to debug 829 ! -1 : debug all section 830 ! 0 < n : debug section number n 773 831 / 774 832 … … 863 921 nn_divdmp = 0 ! Number of iterations of divergence damping operator 864 922 / 923 !----------------------------------------------------------------------- 924 &namsbc_wave ! External fields from wave model 925 !----------------------------------------------------------------------- 926 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! 927 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 928 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 929 ! 930 cn_dir_cdg = './' ! root directory for the location of drag coefficient files 931 / -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
r2978 r3104 9 9 USE in_out_manager ! I/O manager 10 10 USE lib_mpp 11 12 11 IMPLICIT NONE 13 12 PRIVATE -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r2724 r3104 35 35 USE bdydyn ! unstructured open boundaries 36 36 USE bdytides ! tidal forcing at unstructured open boundaries. 37 USE sbctide 38 USE updtide 37 39 USE lib_mpp ! distributed memory computing library 38 40 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 371 373 IF( lk_obc ) CALL obc_dta_bt ( kt, jn ) 372 374 IF( lk_bdy ) CALL bdy_dta_fla( kt, jn+1, icycle ) 375 IF ( ln_tide_pot ) CALL upd_tide( kt, jn ) 373 376 374 377 ! !* after ssh_e … … 418 421 zu_spg = -grav * ( sshn_e(ji+1,jj) - sshn_e(ji,jj) ) / e1u(ji,jj) 419 422 zv_spg = -grav * ( sshn_e(ji,jj+1) - sshn_e(ji,jj) ) / e2v(ji,jj) 423 ENDIF 424 ! add tidal astronomical forcing 425 IF ( ln_tide_pot ) THEN 426 zu_spg = zu_spg + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) / e1u(ji,jj) 427 zv_spg = zv_spg + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) / e2v(ji,jj) 420 428 ENDIF 421 429 ! energy conserving formulation for planetary vorticity term … … 447 455 zv_spg = -grav * ( sshn_e(ji,jj+1) - sshn_e(ji,jj) ) / e2v(ji,jj) 448 456 ENDIF 457 ! add tidal astronomical forcing 458 IF ( ln_tide_pot ) THEN 459 zu_spg = zu_spg + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) / e1u(ji,jj) 460 zv_spg = zv_spg + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) / e2v(ji,jj) 461 ENDIF 449 462 ! enstrophy conserving formulation for planetary vorticity term 450 463 zy1 = z1_8 * ( zwy(ji ,jj-1) + zwy(ji+1,jj-1) + zwy(ji,jj) + zwy(ji+1,jj ) ) / e1u(ji,jj) … … 472 485 zu_spg = -grav * ( sshn_e(ji+1,jj) - sshn_e(ji,jj) ) / e1u(ji,jj) 473 486 zv_spg = -grav * ( sshn_e(ji,jj+1) - sshn_e(ji,jj) ) / e2v(ji,jj) 487 ENDIF 488 ! add tidal astronomical forcing 489 IF ( ln_tide_pot ) THEN 490 zu_spg = zu_spg + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) / e1u(ji,jj) 491 zv_spg = zv_spg + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) / e2v(ji,jj) 474 492 ENDIF 475 493 ! energy/enstrophy conserving formulation for planetary vorticity term -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90
r2528 r3104 52 52 !! 53 53 INTEGER :: jfl, jind ! dummy loop indices 54 REAL(wp), DIMENSION(jpnfl) :: zgifl , zgjfl , zgkfl ! index RK positions 55 REAL(wp), DIMENSION(jpnfl) :: zufl , zvfl , zwfl ! interpolated velocity at the float position 56 REAL(wp), DIMENSION(jpnfl,4) :: zrkxfl, zrkyfl, zrkzfl ! RK coefficients 54 INTEGER :: ierror ! error value 55 56 REAL(wp), ALLOCATABLE, DIMENSION(:) :: zgifl , zgjfl , zgkfl ! index RK positions 57 REAL(wp), ALLOCATABLE, DIMENSION(:) :: zufl , zvfl , zwfl ! interpolated velocity at the float position 58 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zrkxfl, zrkyfl, zrkzfl ! RK coefficients 57 59 !!--------------------------------------------------------------------- 60 61 ALLOCATE ( zgifl(jpnfl) , zgjfl(jpnfl) , zgkfl(jpnfl) , & 62 zufl(jpnfl) , zvfl(jpnfl) , zwfl(jpnfl) , & 63 zrkxfl(jpnfl,4), zrkyfl(jpnfl,4), zrkzfl(jpnfl,4) , STAT=ierror ) 64 ! 65 IF( ierror /= 0 ) THEN 66 WRITE(numout,*) 'flo_4rk: allocation of workspace arrays failed' 67 ENDIF 68 58 69 59 70 IF( kt == nit000 ) THEN … … 145 156 END DO 146 157 END DO 158 ! 159 DEALLOCATE( zgifl , zgjfl , zgkfl ) 160 DEALLOCATE( zufl , zvfl , zwfl ) 161 DEALLOCATE( zrkxfl , zrkyfl , zrkzfl ) 147 162 ! 148 163 END SUBROUTINE flo_4rk -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/FLO/flo_oce.F90
r2715 r3104 24 24 !! float parameters 25 25 !! ---------------- 26 INTEGER, PUBLIC , PARAMETER :: jpnfl = 23!: total number of floats during the run27 INTEGER, PUBLIC , PARAMETER :: jpnnewflo = 0!: number of floats added in a new run28 INTEGER, PUBLIC , PARAMETER :: jpnrstflo = jpnfl - jpnnewflo !: number of floats for the restart26 INTEGER, PUBLIC :: jpnfl !: total number of floats during the run 27 INTEGER, PUBLIC :: jpnnewflo !: number of floats added in a new run 28 INTEGER, PUBLIC :: jpnrstflo !: number of floats for the restart 29 29 30 30 !! float variables 31 31 !! --------------- 32 INTEGER , PUBLIC, DIMENSION(jpnfl) :: nisobfl !: =0 for a isobar float , =1 for a float following the w velocity 33 INTEGER , PUBLIC, DIMENSION(jpnfl) :: ngrpfl !: number to identify searcher group 32 INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: nisobfl !: =0 for a isobar float , =1 for a float following the w velocity 33 INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: ngrpfl !: number to identify searcher group 34 INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: nfloat !: number to identify searcher group 34 35 35 REAL(wp), PUBLIC, DIMENSION(jpnfl) :: flxx , flyy , flzz !: long, lat, depth of float (decimal degree, m >0)36 REAL(wp), PUBLIC, DIMENSION(jpnfl) :: tpifl, tpjfl, tpkfl !: (i,j,k) indices of float position36 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) :: flxx , flyy , flzz !: long, lat, depth of float (decimal degree, m >0) 37 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) :: tpifl, tpjfl, tpkfl !: (i,j,k) indices of float position 37 38 38 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wb !: vertical velocity at previous time step (m s-1). 39 40 40 ! !!! * namelist namflo : langrangian floats * 41 LOGICAL, PUBLIC :: ln_rstflo = .FALSE. !: T/F float restart 42 LOGICAL, PUBLIC :: ln_argo = .FALSE. !: T/F argo type floats 43 LOGICAL, PUBLIC :: ln_flork4 = .FALSE. !: T/F 4th order Runge-Kutta 44 INTEGER, PUBLIC :: nn_writefl = 150 !: frequency of float output file 45 INTEGER, PUBLIC :: nn_stockfl = 450 !: frequency of float restart file 41 ! !!! * namelist namflo : langrangian floats * 42 LOGICAL, PUBLIC :: ln_rstflo = .FALSE. !: T/F float restart 43 LOGICAL, PUBLIC :: ln_argo = .FALSE. !: T/F argo type floats 44 LOGICAL, PUBLIC :: ln_flork4 = .FALSE. !: T/F 4th order Runge-Kutta 45 LOGICAL, PUBLIC :: ln_ariane = .FALSE. !: handle ariane input/output convention 46 LOGICAL, PUBLIC :: ln_flo_ascii = .FALSE. !: write in ascii (T) or in Netcdf (F) 47 48 INTEGER, PUBLIC :: nn_writefl = 150 !: frequency of float output file 49 INTEGER, PUBLIC :: nn_stockfl = 450 !: frequency of float restart file 46 50 47 51 !!---------------------------------------------------------------------- … … 56 60 !! *** FUNCTION flo_oce_alloc *** 57 61 !!---------------------------------------------------------------------- 58 ALLOCATE( wb(jpi,jpj,jpk) , STAT=flo_oce_alloc ) 62 ALLOCATE( wb(jpi,jpj,jpk) , nfloat(jpnfl) , nisobfl(jpnfl) , ngrpfl(jpnfl) , & 63 flxx(jpnfl) , flyy(jpnfl) , flzz(jpnfl) , & 64 tpifl(jpnfl) , tpjfl(jpnfl) , tpkfl(jpnfl) , STAT=flo_oce_alloc ) 59 65 ! 60 66 IF( lk_mpp ) CALL mpp_sum ( flo_oce_alloc ) -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90
r2715 r3104 19 19 USE flodom ! initialisation Module 20 20 USE flowri ! float output (flo_wri routine) 21 USE florst ! float restart (flo_rst routine) 21 22 USE flo4rk ! Trajectories, Runge Kutta scheme (flo_4rk routine) 22 23 USE floblk ! Trajectories, Blanke scheme (flo_blk routine) … … 56 57 IF( lk_mpp ) CALL mppsync ! synchronization of all the processor 57 58 ! 58 IF( kt == nit000 .OR. MOD( kt, nn_writefl ) == 0 ) CALL flo_wri( kt ) ! trajectories file 59 IF( kt == nitend .OR. MOD( kt, nn_stockfl ) == 0 ) CALL flo_wri( kt ) ! restart file 59 CALL flo_wri( kt ) ! trajectories ouput 60 ! 61 CALL flo_rst( kt ) ! trajectories restart 60 62 ! 61 63 wb(:,:,:) = wn(:,:,:) ! Save the old vertical velocity field … … 70 72 !! ** Purpose : Read the namelist of floats 71 73 !!---------------------------------------------------------------------- 72 NAMELIST/namflo/ ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4 74 INTEGER :: jfl 75 ! 76 NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 73 77 !!--------------------------------------------------------------------- 74 78 ! … … 83 87 WRITE(numout,*) 84 88 WRITE(numout,*) ' Namelist floats :' 85 WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo 86 WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl 87 WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl 88 WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo 89 WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 89 WRITE(numout,*) ' number of floats jpnfl = ', jpnfl 90 WRITE(numout,*) ' number of new floats jpnflnewflo = ', jpnnewflo 91 WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo 92 WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl 93 WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl 94 WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo 95 WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 96 WRITE(numout,*) ' Use of ariane convention ln_ariane = ', ln_ariane 97 WRITE(numout,*) ' ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii 98 90 99 ENDIF 91 100 ! … … 93 102 IF( flo_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) 94 103 ! 104 ! ! allocate flodom arrays 105 IF( flo_dom_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) 106 ! 95 107 ! ! allocate flowri arrays 96 108 IF( flo_wri_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) 109 ! 110 ! ! allocate florst arrays 111 IF( flo_rst_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 112 ! 113 !memory allocation 114 jpnrstflo = jpnfl-jpnnewflo 115 116 !vertical axe for netcdf IOM ouput 117 DO jfl=1,jpnfl ; nfloat(jfl)=jfl ; ENDDO 118 97 119 ! 98 120 CALL flo_dom ! compute/read initial position of floats -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90
r2528 r3104 4 4 !! Ocean floats : domain 5 5 !!====================================================================== 6 !! History : OPA ! 1998-07 (Y.Drillet, CLIPPER) Original code 6 !! History : OPA ! 1998-07 (Y.Drillet, CLIPPER) Original code 7 !! NEMO_3.3.1 ! 2011-09 (C.Bricaud,S.Law-Chune Mercator-Ocean): 8 ! add Ariane convention, Comsecitc changes 7 9 !!---------------------------------------------------------------------- 8 10 #if defined key_floats || defined key_esopa … … 10 12 !! 'key_floats' float trajectories 11 13 !!---------------------------------------------------------------------- 12 !! flo_dom : initialization of floats 13 !! findmesh : compute index of position 14 !! dstnce : compute distance between face mesh and floats 14 !! flo_dom : initialization of floats 15 !! add_new_floats : add new floats (long/lat/depth) 16 !! add_new_ariane_floats : add new floats with araine convention (i/j/k) 17 !! findmesh : compute index of position 18 !! dstnce : compute distance between face mesh and floats 15 19 !!---------------------------------------------------------------------- 16 20 USE oce ! ocean dynamics and tracers … … 23 27 PRIVATE 24 28 25 PUBLIC flo_dom ! routine called by floats.F90 29 PUBLIC flo_dom ! routine called by floats.F90 30 PUBLIC flo_dom_alloc ! Routine called in floats.F90 31 32 CHARACTER (len=21) :: clname1 = 'init_float' ! floats initialisation filename 33 CHARACTER (len=21) :: clname2 = 'init_float_ariane' ! ariane floats initialisation filename 34 35 36 INTEGER , ALLOCATABLE, DIMENSION(:) :: iimfl, ijmfl, ikmfl ! index mesh of floats 37 INTEGER , ALLOCATABLE, DIMENSION(:) :: idomfl, ivtest, ihtest ! - 38 REAL(wp), ALLOCATABLE, DIMENSION(:) :: zgifl, zgjfl, zgkfl ! distances in indexes 26 39 27 40 !! * Substitutions … … 43 56 !! the longitude (degree) and the depth (m). 44 57 !!---------------------------------------------------------------------- 45 LOGICAL :: llinmesh 46 INTEGER :: ji, jj, jk ! DO loop index on 3 directions 47 INTEGER :: jfl, jfl1 ! number of floats 48 INTEGER :: inum ! logical unit for file read 49 INTEGER, DIMENSION(jpnfl) :: iimfl, ijmfl, ikmfl ! index mesh of floats 50 INTEGER, DIMENSION(jpnfl) :: idomfl, ivtest, ihtest ! - - 51 REAL(wp) :: zdxab, zdyad 52 REAL(wp), DIMENSION(jpnnewflo+1) :: zgifl, zgjfl, zgkfl 58 INTEGER :: jfl ! dummy loop 59 INTEGER :: inum ! logical unit for file read 53 60 !!--------------------------------------------------------------------- 54 61 … … 59 66 IF(lwp) WRITE(numout,*) ' jpnfl = ',jpnfl 60 67 61 IF(ln_rstflo) THEN 68 !-------------------------! 69 ! FLOAT RESTART FILE READ ! 70 !-------------------------! 71 IF( ln_rstflo )THEN 72 62 73 IF(lwp) WRITE(numout,*) ' float restart file read' 63 74 64 75 ! open the restart file 76 !---------------------- 65 77 CALL ctl_opn( inum, 'restart_float', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 66 78 67 79 ! read of the restart file 68 READ(inum )( tpifl (jfl), jfl=1, jpnrstflo), &80 READ(inum,*) ( tpifl (jfl), jfl=1, jpnrstflo), & 69 81 ( tpjfl (jfl), jfl=1, jpnrstflo), & 70 82 ( tpkfl (jfl), jfl=1, jpnrstflo), & … … 74 86 75 87 ! if we want a surface drift ( like PROVOR floats ) 76 IF( ln_argo ) THEN 77 DO jfl = 1, jpnrstflo 78 nisobfl(jfl) = 0 79 END DO 80 ENDIF 81 82 IF(lwp) WRITE(numout,*)' flo_dom: END of florstlec' 88 IF( ln_argo ) nisobfl(1:jpnrstflo) = 0 83 89 84 90 ! It is possible to add new floats. 85 IF(lwp) WRITE(numout,*)' flo_dom:jpnfl jpnrstflo ',jpnfl,jpnrstflo 86 IF( jpnfl > jpnrstflo ) THEN 87 ! open the init file 88 CALL ctl_opn( inum, 'init_float', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 89 DO jfl = jpnrstflo+1, jpnfl 90 READ(inum,*) flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),jfl1 91 END DO 92 CLOSE(inum) 93 IF(lwp) WRITE(numout,*)' flodom: END reading init_float file' 91 !--------------------------------- 92 IF( jpnfl > jpnrstflo )THEN 93 94 IF(lwp) WRITE(numout,*) ' add new floats' 95 96 IF( ln_ariane )THEN !Add new floats with ariane convention 97 CALL flo_add_new_ariane_floats(jpnrstflo+1,jpnfl) 98 ELSE !Add new floats with long/lat convention 99 CALL flo_add_new_floats(jpnrstflo+1,jpnfl) 100 ENDIF 101 ENDIF 102 103 !--------------------------------------! 104 ! FLOAT INITILISATION: NO RESTART FILE ! 105 !--------------------------------------! 106 ELSE !ln_rstflo 107 108 IF( ln_ariane )THEN !Add new floats with ariane convention 109 CALL flo_add_new_ariane_floats(1,jpnfl) 110 ELSE !Add new floats with long/lat convention 111 CALL flo_add_new_floats(1,jpnfl) 112 ENDIF 113 114 ENDIF 94 115 95 ! Test to find the grid point coordonate with the geographical position 96 DO jfl = jpnrstflo+1, jpnfl 97 ihtest(jfl) = 0 98 ivtest(jfl) = 0 99 ikmfl(jfl) = 0 116 END SUBROUTINE flo_dom 117 118 SUBROUTINE flo_add_new_floats(kfl_start, kfl_end) 119 !! ------------------------------------------------------------- 120 !! *** SUBROUTINE add_new_arianefloats *** 121 !! 122 !! ** Purpose : 123 !! 124 !! First initialisation of floats 125 !! the initials positions of floats are written in a file 126 !! with a variable to know if it is a isobar float a number 127 !! to identified who want the trajectories of this float and 128 !! an index for the number of the float 129 !! open the init file 130 !! 131 !! ** Method : 132 !!---------------------------------------------------------------------- 133 INTEGER, INTENT(in) :: kfl_start, kfl_end 134 !! 135 INTEGER :: inum ! file unit 136 INTEGER :: jfl,ji, jj, jk ! dummy loop indices 137 INTEGER :: itrash ! trash var for reading 138 INTEGER :: ifl ! number of floats to read 139 REAL(wp) :: zdxab, zdyad 140 LOGICAL :: llinmesh 141 CHARACTER(len=80) :: cltmp 142 !!--------------------------------------------------------------------- 143 ifl = kfl_end-kfl_start+1 144 145 ! we get the init values 146 !----------------------- 147 CALL ctl_opn( inum , clname1, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 148 DO jfl = kfl_start,kfl_end 149 READ(inum,*) flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),itrash 150 if(lwp)write(numout,*)'read:',jfl,flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),itrash ; call flush(numout) 151 END DO 152 CLOSE(inum) 153 154 ! Test to find the grid point coordonate with the geographical position 155 !---------------------------------------------------------------------- 156 DO jfl = kfl_start,kfl_end 157 ihtest(jfl) = 0 158 ivtest(jfl) = 0 159 ikmfl(jfl) = 0 100 160 # if defined key_mpp_mpi 101 102 103 # else 104 105 161 DO ji = MAX(nldi,2), nlei 162 DO jj = MAX(nldj,2), nlej ! NO vector opt. 163 # else 164 DO ji = 2, jpi 165 DO jj = 2, jpj ! NO vector opt. 106 166 # endif 107 ! For each float we find the indexes of the mesh 108 CALL findmesh(glamf(ji-1,jj-1),gphif(ji-1,jj-1), & 109 glamf(ji-1,jj ),gphif(ji-1,jj ), & 110 glamf(ji ,jj ),gphif(ji ,jj ), & 111 glamf(ji ,jj-1),gphif(ji ,jj-1), & 112 flxx(jfl) ,flyy(jfl) , & 113 glamt(ji ,jj ),gphit(ji ,jj ), llinmesh) 114 IF(llinmesh) THEN 115 iimfl(jfl) = ji 116 ijmfl(jfl) = jj 117 ihtest(jfl) = ihtest(jfl)+1 118 DO jk = 1, jpk-1 119 IF( (fsdepw(ji,jj,jk) <= flzz(jfl)) .AND. (fsdepw(ji,jj,jk+1) > flzz(jfl)) ) THEN 120 ikmfl(jfl) = jk 121 ivtest(jfl) = ivtest(jfl) + 1 122 ENDIF 123 END DO 167 ! For each float we find the indexes of the mesh 168 CALL flo_findmesh(glamf(ji-1,jj-1),gphif(ji-1,jj-1), & 169 glamf(ji-1,jj ),gphif(ji-1,jj ), & 170 glamf(ji ,jj ),gphif(ji ,jj ), & 171 glamf(ji ,jj-1),gphif(ji ,jj-1), & 172 flxx(jfl) ,flyy(jfl) , & 173 glamt(ji ,jj ),gphit(ji ,jj ), llinmesh) 174 IF( llinmesh )THEN 175 iimfl(jfl) = ji 176 ijmfl(jfl) = jj 177 ihtest(jfl) = ihtest(jfl)+1 178 DO jk = 1, jpk-1 179 IF( (fsdepw(ji,jj,jk) <= flzz(jfl)) .AND. (fsdepw(ji,jj,jk+1) > flzz(jfl)) ) THEN 180 ikmfl(jfl) = jk 181 ivtest(jfl) = ivtest(jfl) + 1 124 182 ENDIF 125 183 END DO 126 END DO127 IF(lwp) WRITE(numout,*)' flo_dom: END findmesh'128 129 ! If the float is in a mesh computed by an other processor we put iimfl=ijmfl=-1130 IF( ihtest(jfl) == 0 ) THEN131 iimfl(jfl) = -1132 ijmfl(jfl) = -1133 184 ENDIF 134 185 END DO 186 END DO 187 188 ! If the float is in a mesh computed by an other processor we put iimfl=ijmfl=-1 189 IF( ihtest(jfl) == 0 ) THEN 190 iimfl(jfl) = -1 191 ijmfl(jfl) = -1 192 ENDIF 193 END DO 194 195 !Test if each float is in one and only one proc 196 !---------------------------------------------- 197 IF( lk_mpp ) THEN 198 CALL mpp_sum(ihtest,jpnfl) 199 CALL mpp_sum(ivtest,jpnfl) 200 ENDIF 201 DO jfl = kfl_start,kfl_end 202 203 IF( (ihtest(jfl) > 1 ) .OR. ( ivtest(jfl) > 1) ) THEN 204 WRITE(cltmp,'(A10,i4.4,A20)' )'THE FLOAT',jfl,' IS NOT IN ONLY ONE MESH' 205 CALL ctl_stop('STOP',TRIM(cltmp) ) 206 ENDIF 207 IF( (ihtest(jfl) == 0) ) THEN 208 WRITE(cltmp,'(A10,i4.4,A20)' )'THE FLOAT',jfl,' IS IN NO MESH' 209 CALL ctl_stop('STOP',TRIM(cltmp) ) 210 ENDIF 211 END DO 212 213 ! We compute the distance between the float and the face of the mesh 214 !------------------------------------------------------------------- 215 DO jfl = kfl_start,kfl_end 216 217 ! Made only if the float is in the domain of the processor 218 IF( (iimfl(jfl) >= 0) .AND. (ijmfl(jfl) >= 0) ) THEN 219 220 ! TEST TO KNOW IF THE FLOAT IS NOT INITIALISED IN THE COAST 221 idomfl(jfl) = 0 222 IF( tmask(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) == 0. ) idomfl(jfl) = 1 223 224 ! Computation of the distance between the float and the faces of the mesh 225 ! zdxab 226 ! . 227 ! B----.---------C 228 ! | . | 229 ! |<------>flo | 230 ! | ^ | 231 ! | |.....|....zdyad 232 ! | | | 233 ! A--------|-----D 234 ! 235 zdxab = flo_dstnce( flxx(jfl), flyy(jfl), glamf(iimfl(jfl)-1,ijmfl(jfl)-1), flyy(jfl) ) 236 zdyad = flo_dstnce( flxx(jfl), flyy(jfl), flxx(jfl), gphif(iimfl(jfl)-1,ijmfl(jfl)-1) ) 237 238 ! Translation of this distances (in meter) in indexes 239 zgifl(jfl)= (iimfl(jfl)-0.5) + zdxab/e1u(iimfl(jfl)-1,ijmfl(jfl)) + (mig(1)-jpizoom) 240 zgjfl(jfl)= (ijmfl(jfl)-0.5) + zdyad/e2v(iimfl(jfl),ijmfl(jfl)-1) + (mjg(1)-jpjzoom) 241 zgkfl(jfl) = (( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl) )* ikmfl(jfl)) & 242 & / ( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) & 243 & - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl) ) ) & 244 & + (( flzz(jfl)-fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) *(ikmfl(jfl)+1)) & 245 & / ( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) & 246 & - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) 247 ELSE 248 zgifl(jfl) = 0.e0 249 zgjfl(jfl) = 0.e0 250 zgkfl(jfl) = 0.e0 251 ENDIF 252 253 END DO 254 255 ! The sum of all the arrays zgifl, zgjfl, zgkfl give 3 arrays with the positions of all the floats. 256 IF( lk_mpp ) THEN 257 CALL mpp_sum( zgjfl, ifl ) ! sums over the global domain 258 CALL mpp_sum( zgkfl, ifl ) 259 ENDIF 135 260 136 ! A zero in the sum of the arrays "ihtest" and "ivtest" 137 # if defined key_mpp_mpi 138 CALL mpp_sum(ihtest,jpnfl) 139 CALL mpp_sum(ivtest,jpnfl) 140 # endif 141 DO jfl = jpnrstflo+1, jpnfl 142 IF( (ihtest(jfl) > 1 ) .OR. ( ivtest(jfl) > 1) ) THEN 143 IF(lwp) WRITE(numout,*) 'THE FLOAT',jfl,' IS NOT IN ONLY ONE MESH' 144 STOP 145 ENDIF 146 IF( (ihtest(jfl) == 0) ) THEN 147 IF(lwp) WRITE(numout,*)'THE FLOAT',jfl,' IS IN NO MESH' 148 STOP 149 ENDIF 150 END DO 151 152 ! We compute the distance between the float and the face of the mesh 153 DO jfl = jpnrstflo+1, jpnfl 154 ! Made only if the float is in the domain of the processor 155 IF( (iimfl(jfl) >= 0) .AND. (ijmfl(jfl) >= 0) ) THEN 156 157 ! TEST TO KNOW IF THE FLOAT IS NOT INITIALISED IN THE COAST 158 159 idomfl(jfl) = 0 160 IF( tmask(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) == 0. ) idomfl(jfl) = 1 161 162 ! Computation of the distance between the float and the faces of the mesh 163 ! zdxab 164 ! . 165 ! B----.---------C 166 ! | . | 167 ! |<------>flo | 168 ! | ^ | 169 ! | |.....|....zdyad 170 ! | | | 171 ! A--------|-----D 172 ! 173 174 zdxab = dstnce( flxx(jfl), flyy(jfl), glamf(iimfl(jfl)-1,ijmfl(jfl)-1), flyy(jfl) ) 175 zdyad = dstnce( flxx(jfl), flyy(jfl), flxx(jfl), gphif(iimfl(jfl)-1,ijmfl(jfl)-1) ) 176 177 ! Translation of this distances (in meter) in indexes 178 179 zgifl(jfl-jpnrstflo)= (iimfl(jfl)-0.5) + zdxab/e1u(iimfl(jfl)-1,ijmfl(jfl)) + (mig(1)-jpizoom) 180 zgjfl(jfl-jpnrstflo)= (ijmfl(jfl)-0.5) + zdyad/e2v(iimfl(jfl),ijmfl(jfl)-1) + (mjg(1)-jpjzoom) 181 zgkfl(jfl-jpnrstflo) = (( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl) )* ikmfl(jfl)) & 182 & / ( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) & 183 & - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl) ) ) & 184 & + (( flzz(jfl)-fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) *(ikmfl(jfl)+1)) & 185 & / ( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) & 186 & - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) 187 ELSE 188 zgifl(jfl-jpnrstflo) = 0.e0 189 zgjfl(jfl-jpnrstflo) = 0.e0 190 zgkfl(jfl-jpnrstflo) = 0.e0 191 ENDIF 192 END DO 193 194 ! The sum of all the arrays zgifl, zgjfl, zgkfl give 3 arrays with the positions of all the floats. 195 IF( lk_mpp ) THEN 196 CALL mpp_sum( zgjfl, jpnnewflo ) ! sums over the global domain 197 CALL mpp_sum( zgkfl, jpnnewflo ) 198 IF(lwp) WRITE(numout,*) (zgifl(jfl),jfl=1,jpnnewflo) 199 IF(lwp) WRITE(numout,*) (zgjfl(jfl),jfl=1,jpnnewflo) 200 IF(lwp) WRITE(numout,*) (zgkfl(jfl),jfl=1,jpnnewflo) 201 ENDIF 202 203 DO jfl = jpnrstflo+1, jpnfl 204 tpifl(jfl) = zgifl(jfl-jpnrstflo) 205 tpjfl(jfl) = zgjfl(jfl-jpnrstflo) 206 tpkfl(jfl) = zgkfl(jfl-jpnrstflo) 207 END DO 208 ENDIF 209 ELSE 210 IF(lwp) WRITE(numout,*) ' init_float read ' 211 212 ! First initialisation of floats 213 ! the initials positions of floats are written in a file 214 ! with a variable to know if it is a isobar float a number 215 ! to identified who want the trajectories of this float and 216 ! an index for the number of the float 217 ! open the init file 218 CALL ctl_opn( inum, 'init_float', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 219 READ(inum) (flxx(jfl) , jfl=1, jpnfl), & 220 (flyy(jfl) , jfl=1, jpnfl), & 221 (flzz(jfl) , jfl=1, jpnfl), & 222 (nisobfl(jfl), jfl=1, jpnfl), & 223 (ngrpfl(jfl) , jfl=1, jpnfl) 224 CLOSE(inum) 225 226 ! Test to find the grid point coordonate with the geographical position 227 DO jfl = 1, jpnfl 228 ihtest(jfl) = 0 229 ivtest(jfl) = 0 230 ikmfl(jfl) = 0 231 # if defined key_mpp_mpi 232 DO ji = MAX(nldi,2), nlei 233 DO jj = MAX(nldj,2), nlej ! NO vector opt. 234 # else 235 DO ji = 2, jpi 236 DO jj = 2, jpj ! NO vector opt. 237 # endif 238 ! for each float we find the indexes of the mesh 239 240 CALL findmesh(glamf(ji-1,jj-1),gphif(ji-1,jj-1), & 241 glamf(ji-1,jj ),gphif(ji-1,jj ), & 242 glamf(ji ,jj ),gphif(ji ,jj ), & 243 glamf(ji ,jj-1),gphif(ji ,jj-1), & 244 flxx(jfl) ,flyy(jfl) , & 245 glamt(ji ,jj ),gphit(ji ,jj ), llinmesh) 246 IF(llinmesh) THEN 247 iimfl(jfl) = ji 248 ijmfl(jfl) = jj 249 ihtest(jfl) = ihtest(jfl)+1 250 DO jk = 1, jpk-1 251 IF( (fsdepw(ji,jj,jk) <= flzz(jfl)) .AND. (fsdepw(ji,jj,jk+1) > flzz(jfl)) ) THEN 252 ikmfl(jfl) = jk 253 ivtest(jfl) = ivtest(jfl) + 1 254 ENDIF 255 END DO 256 ENDIF 257 END DO 258 END DO 259 260 ! If the float is in a mesh computed by an other processor we put iimfl=ijmfl=-1 261 IF( ihtest(jfl) == 0 ) THEN 262 iimfl(jfl) = -1 263 ijmfl(jfl) = -1 264 ENDIF 265 END DO 266 267 ! A zero in the sum of the arrays "ihtest" and "ivtest" 268 IF( lk_mpp ) CALL mpp_sum(ihtest,jpnfl) ! sums over the global domain 269 IF( lk_mpp ) CALL mpp_sum(ivtest,jpnfl) 270 271 DO jfl = 1, jpnfl 272 IF( (ihtest(jfl) > 1 ) .OR. ( ivtest(jfl) > 1 )) THEN 273 IF(lwp) WRITE(numout,*) 'THE FLOAT',jfl,' IS NOT IN ONLY ONE MESH' 274 ENDIF 275 IF( ihtest(jfl) == 0 ) THEN 276 IF(lwp) WRITE(numout,*)'THE FLOAT',jfl,' IS IN NO MESH' 277 ENDIF 278 END DO 279 280 ! We compute the distance between the float and the face of the mesh 281 DO jfl = 1, jpnfl 282 ! Made only if the float is in the domain of the processor 283 IF( (iimfl(jfl) >= 0 ) .AND. ( ijmfl(jfl) >= 0 ) ) THEN 284 285 ! TEST TO KNOW IF THE FLOAT IS NOT INITIALISED IN THE COAST 286 287 idomfl(jfl) = 0 288 IF( tmask(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) == 0. ) idomfl(jfl)=1 289 290 ! Computation of the distance between the float 291 ! and the faces of the mesh 292 ! zdxab 293 ! . 294 ! B----.---------C 295 ! | . | 296 ! |<------>flo | 297 ! | ^ | 298 ! | |.....|....zdyad 299 ! | | | 300 ! A--------|-----D 301 302 zdxab = dstnce(flxx(jfl),flyy(jfl),glamf(iimfl(jfl)-1,ijmfl(jfl)-1),flyy(jfl)) 303 zdyad = dstnce(flxx(jfl),flyy(jfl),flxx(jfl),gphif(iimfl(jfl)-1,ijmfl(jfl)-1)) 304 305 ! Translation of this distances (in meter) in indexes 306 307 tpifl(jfl) = (iimfl(jfl)-0.5)+zdxab/ e1u(iimfl(jfl)-1,ijmfl(jfl))+(mig(1)-jpizoom) 308 tpjfl(jfl) = (ijmfl(jfl)-0.5)+zdyad/ e2v(iimfl(jfl),ijmfl(jfl)-1)+(mjg(1)-jpjzoom) 309 tpkfl(jfl) = (fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl))*(ikmfl(jfl)) & 310 / (fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl))) & 311 + (flzz(jfl) - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)))*(ikmfl(jfl)+1) & 312 / (fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl))) 313 ELSE 314 tpifl (jfl) = 0.e0 315 tpjfl (jfl) = 0.e0 316 tpkfl (jfl) = 0.e0 317 idomfl(jfl) = 0 318 ENDIF 319 END DO 320 321 ! The sum of all the arrays tpifl, tpjfl, tpkfl give 3 arrays with the positions of all the floats. 322 IF( lk_mpp ) CALL mpp_sum( tpifl , jpnfl ) ! sums over the global domain 323 IF( lk_mpp ) CALL mpp_sum( tpjfl , jpnfl ) 324 IF( lk_mpp ) CALL mpp_sum( tpkfl , jpnfl ) 325 IF( lk_mpp ) CALL mpp_sum( idomfl, jpnfl ) 326 ENDIF 327 328 ! Print the initial positions of the floats 261 DO jfl = kfl_start,kfl_end 262 tpifl(jfl) = zgifl(jfl) 263 tpjfl(jfl) = zgjfl(jfl) 264 tpkfl(jfl) = zgkfl(jfl) 265 END DO 266 267 ! WARNING : initial position not in the sea 329 268 IF( .NOT. ln_rstflo ) THEN 330 ! WARNING : initial position not in the sea 331 DO jfl = 1, jpnfl 269 DO jfl = kfl_start,kfl_end 332 270 IF( idomfl(jfl) == 1 ) THEN 333 271 IF(lwp) WRITE(numout,*)'*****************************' … … 341 279 ENDIF 342 280 343 END SUBROUTINE flo_dom 344 345 346 SUBROUTINE findmesh( pax, pay, pbx, pby, & 347 pcx, pcy, pdx, pdy, & 348 px ,py ,ptx, pty, ldinmesh ) 281 END SUBROUTINE flo_add_new_floats 282 283 SUBROUTINE flo_add_new_ariane_floats(kfl_start, kfl_end) 284 !! ------------------------------------------------------------- 285 !! *** SUBROUTINE add_new_arianefloats *** 286 !! 287 !! ** Purpose : 288 !! First initialisation of floats with ariane convention 289 !! 290 !! The indexes are read directly from file (warning ariane 291 !! convention, are refered to 292 !! U,V,W grids - and not T-) 293 !! The isobar advection is managed with the sign of tpkfl ( >0 -> 3D 294 !! advection, <0 -> 2D) 295 !! Some variables are not read, as - gl : time index; 4th 296 !! column 297 !! - transport : transport ; 5th 298 !! column 299 !! and paste in the jtrash var 300 !! At the end, ones need to replace the indexes on T grid 301 !! RMQ : there is no float groups identification ! 302 !! 303 !! 304 !! ** Method : 305 !!---------------------------------------------------------------------- 306 INTEGER, INTENT(in) :: kfl_start, kfl_end 307 !! 308 INTEGER :: inum ! file unit 309 INTEGER :: ierr, ifl 310 INTEGER :: jfl, jfl1 ! dummy loop indices 311 INTEGER :: itrash ! trash var for reading 312 CHARACTER(len=80) :: cltmp 313 314 !!---------------------------------------------------------------------- 315 nisobfl(kfl_start:kfl_end) = 1 ! we assume that by default we want 3D advection 316 317 ifl = kfl_end - kfl_start + 1 ! number of floats to read 318 319 ! we check that the number of floats in the init_file are consistant with the namelist 320 IF( lwp ) THEN 321 322 jfl1=0 323 ierr=0 324 CALL ctl_opn( inum, clname2, 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .TRUE., 1 ) 325 DO WHILE (ierr .EQ. 0) 326 jfl1=jfl1+1 327 READ(inum,*, iostat=ierr) 328 END DO 329 CLOSE(inum) 330 IF( (jfl1-1) .NE. ifl )THEN 331 WRITE(cltmp,'(A25,A20,A3,i4.4,A10,i4.4)')"the number of floats in ",TRIM(clname2), & 332 " = ",jfl1," is not equal to jfl= ",ifl 333 CALL ctl_stop('STOP',TRIM(cltmp) ) 334 ENDIF 335 336 ENDIF 337 338 ! we get the init values 339 CALL ctl_opn( inum, clname2, 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .TRUE., 1 ) 340 DO jfl = kfl_start, kfl_end 341 READ(inum,*) tpifl(jfl),tpjfl(jfl),tpkfl(jfl),itrash, itrash 342 343 IF ( tpkfl(jfl) .LT. 0. ) nisobfl(jfl) = 0 !set the 2D advection according to init_float 344 ngrpfl(jfl)=jfl 345 END DO 346 347 ! conversion from ariane index to T grid index 348 tpkfl(kfl_start:kfl_end) = abs(tpkfl)-0.5 ! reversed vertical axis 349 tpifl(kfl_start:kfl_end) = tpifl+0.5 350 tpjfl(kfl_start:kfl_end) = tpjfl+0.5 351 352 353 END SUBROUTINE flo_add_new_ariane_floats 354 355 356 SUBROUTINE flo_findmesh( pax, pay, pbx, pby, & 357 pcx, pcy, pdx, pdy, & 358 px ,py ,ptx, pty, ldinmesh ) 349 359 !! ------------------------------------------------------------- 350 360 !! *** ROUTINE findmesh *** … … 402 412 ENDIF 403 413 ! 404 END SUBROUTINE f indmesh405 406 407 FUNCTION dstnce( pla1, phi1, pla2, phi2 )414 END SUBROUTINE flo_findmesh 415 416 417 FUNCTION flo_dstnce( pla1, phi1, pla2, phi2 ) 408 418 !! ------------------------------------------------------------- 409 419 !! *** Function dstnce *** … … 415 425 REAL(wp), INTENT(in) :: pla1, phi1, pla2, phi2 ! ??? 416 426 !! 417 REAL(wp) :: 418 REAL(wp) :: 427 REAL(wp) :: dly1, dly2, dlx1, dlx2, dlx, dls, dld, dpi 428 REAL(wp) :: flo_dstnce 419 429 !!--------------------------------------------------------------------- 420 430 ! 421 dpi = 2. * ASIN(1.)422 dls = dpi / 180. 431 dpi = 2._wp * ASIN(1._wp) 432 dls = dpi / 180._wp 423 433 dly1 = phi1 * dls 424 434 dly2 = phi2 * dls … … 428 438 dlx = SIN(dly1) * SIN(dly2) + COS(dly1) * COS(dly2) * COS(dlx2-dlx1) 429 439 ! 430 IF( ABS(dlx) > 1.0 ) dlx = 1.0 431 ! 432 dld = ATAN(DSQRT( ( 1-dlx )/( 1+dlx ) )) * 222.24 / dls 433 dstnce = dld * 1000. 434 ! 435 END FUNCTION dstnce 436 437 # else 440 IF( ABS(dlx) > 1.0_wp ) dlx = 1.0_wp 441 ! 442 dld = ATAN(DSQRT( 1._wp * ( 1._wp-dlx )/( 1._wp+dlx ) )) * 222.24_wp / dls 443 flo_dstnce = dld * 1000._wp 444 ! 445 END FUNCTION flo_dstnce 446 447 INTEGER FUNCTION flo_dom_alloc() 448 !!---------------------------------------------------------------------- 449 !! *** FUNCTION flo_dom_alloc *** 450 !!---------------------------------------------------------------------- 451 452 ALLOCATE( iimfl(jpnfl) , ijmfl(jpnfl) , ikmfl(jpnfl) , & 453 idomfl(jpnfl), ivtest(jpnfl), ihtest(jpnfl), & 454 zgifl(jpnfl) , zgjfl(jpnfl) , zgkfl(jpnfl) , STAT=flo_dom_alloc ) 455 ! 456 IF( lk_mpp ) CALL mpp_sum ( flo_dom_alloc ) 457 IF( flo_dom_alloc /= 0 ) CALL ctl_warn('flo_dom_alloc: failed to allocate arrays') 458 END FUNCTION flo_dom_alloc 459 460 461 #else 438 462 !!---------------------------------------------------------------------- 439 463 !! Default option Empty module … … 441 465 CONTAINS 442 466 SUBROUTINE flo_dom ! Empty routine 467 WRITE(*,*) 'flo_dom: : You should not have seen this print! error?' 443 468 END SUBROUTINE flo_dom 444 469 #endif -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90
r2977 r3104 2 2 !!====================================================================== 3 3 !! *** MODULE flowri *** 4 !! lagrangian floats : outputs 4 !! 5 !! write floats trajectory in ascii ln_flo_ascii = T 6 !! or in netcdf ( IOM or IOSPSL ) ln_flo_ascii = F 7 !! 8 !! 5 9 !!====================================================================== 6 !! History : OPA ! 1999-09 (Y. Drillet) Original code 7 !! ! 2000-06 (J.-M. Molines) Profiling floats for CLS 8 !! NEMO 1.0 ! 2002-11 (G. Madec, A. Bozec) F90: Free form and module 10 !! History : 11 !! 8.0 ! 99-09 (Y. Drillet) : Original code 12 !! ! 00-06 (J.-M. Molines) : Profiling floats for CLS 13 !! 8.5 ! 02-10 (A. Bozec) F90 : Free form and module 14 !! 3.2 ! 10-08 (slaw, cbricaud): netcdf outputs and others 9 15 !!---------------------------------------------------------------------- 10 16 #if defined key_floats || defined key_esopa … … 12 18 !! 'key_floats' float trajectories 13 19 !!---------------------------------------------------------------------- 14 !! flowri : write trajectories of floats in file 15 !! ----------------------------------------------------------------------20 21 !! * Modules used 16 22 USE flo_oce ! ocean drifting floats 17 23 USE oce ! ocean dynamics and tracers … … 19 25 USE lib_mpp ! distribued memory computing library 20 26 USE in_out_manager ! I/O manager 27 USE phycst ! physic constants 28 USE dianam ! build name of file (routine) 29 USE ioipsl 30 USE iom ! I/O library 31 21 32 22 33 IMPLICIT NONE 23 34 PRIVATE 24 35 25 PUBLIC 26 PUBLIC 27 28 INTEGER :: jfl! number of floats29 INTEGER :: numflo ! logical unit for drifting floats36 PUBLIC flo_wri ! routine called by floats.F90 37 PUBLIC flo_wri_alloc ! routine called by floats.F90 38 39 INTEGER :: jfl ! number of floats 40 CHARACTER (len=80) :: clname ! netcdf output filename 30 41 31 42 ! Following are only workspace arrays but shape is not (jpi,jpj) and 32 43 ! therefore make them module arrays rather than replacing with wrk_nemo 33 44 ! member arrays. 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ztemp, zsal ! 2D workspace 45 REAL(wp), ALLOCATABLE, DIMENSION(:) :: zlon , zlat, zdep ! 2D workspace 46 REAL(wp), ALLOCATABLE, DIMENSION(:) :: ztem , zsal, zrho ! 2D workspace 35 47 36 48 !! * Substitutions 37 49 # include "domzgr_substitute.h90" 38 50 !!---------------------------------------------------------------------- 39 !! NEMO/OPA 4.0 , NEMO Consortium (2011) 40 !! $Id$ 41 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 42 !!---------------------------------------------------------------------- 51 !! NEMO/OPA 3.2 , LODYC-IPSL (2009) 52 !! $Header: 53 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 54 !!---------------------------------------------------------------------- 55 43 56 CONTAINS 44 57 45 INTEGER FUNCTION flo_wri_alloc 58 INTEGER FUNCTION flo_wri_alloc() 46 59 !!------------------------------------------------------------------- 47 60 !! *** FUNCTION flo_wri_alloc *** 48 61 !!------------------------------------------------------------------- 49 ALLOCATE( ztemp(jpk,jpnfl) , zsal(jpk,jpnfl) , STAT=flo_wri_alloc) 50 ! 62 ALLOCATE( ztem(jpnfl) , zsal(jpnfl) , zrho(jpnfl) , & 63 zlon(jpnfl) , zlat(jpnfl) , zdep(jpnfl) , STAT=flo_wri_alloc) 64 ! 51 65 IF( lk_mpp ) CALL mpp_sum ( flo_wri_alloc ) 52 66 IF( flo_wri_alloc /= 0 ) CALL ctl_warn('flo_wri_alloc: failed to allocate arrays.') 53 67 END FUNCTION flo_wri_alloc 54 68 55 56 69 SUBROUTINE flo_wri( kt ) 57 !!------------------------------------------------------------------- 58 !! *** ROUTINE flo_wri 70 !!--------------------------------------------------------------------- 71 !! *** ROUTINE flo_wri *** 59 72 !! 60 !! ** Purpose : Write position of floats in "trajec_float" file 61 !! and the temperature and salinity at this position 73 !! ** Purpose : Write position of floats in "trajec_float.nc",according 74 !! to ARIANE TOOLS (http://stockage.univ-brest.fr/~grima/Ariane/ ) n 75 !! nomenclature 76 !! 62 77 !! 63 !! ** Method : The frequency is nn_writefl 78 !! ** Method : The frequency of ??? is nwritefl 79 !! 64 80 !!---------------------------------------------------------------------- 65 INTEGER :: kt ! time step 66 !! 67 CHARACTER (len=21) :: clname 68 INTEGER :: inum ! temporary logical unit for restart file 69 INTEGER :: iafl, ibfl, icfl, ia1fl, ib1fl, ic1fl, jfl, irecflo 70 INTEGER :: iafloc, ibfloc, ia1floc, ib1floc, iafln, ibfln 71 INTEGER :: ic, jc , jpn 72 INTEGER, DIMENSION ( jpnij ) :: iproc 73 REAL(wp) :: zafl, zbfl, zcfl, zdtj 74 REAL(wp) :: zxxu, zxxu_01,zxxu_10, zxxu_11 75 !!--------------------------------------------------------------------- 81 !! * Arguments 82 INTEGER :: kt ! time step 83 84 !! * Local declarations 85 INTEGER :: iafl , ibfl , icfl ! temporary integer 86 INTEGER :: ia1fl, ib1fl, ic1fl ! " 87 INTEGER :: iafloc,ibfloc,ia1floc,ib1floc ! " 88 INTEGER :: irec, irecflo 89 90 REAL(wp) :: zafl,zbfl,zcfl ! temporary real 91 REAL(wp) :: ztime ! " 92 93 INTEGER, DIMENSION(2) :: icount 94 INTEGER, DIMENSION(2) :: istart 95 INTEGER, DIMENSION(1) :: ish 96 INTEGER, DIMENSION(2) :: ish2 97 !!---------------------------------------------------------------------- 76 98 77 IF( kt == nit000 .OR. MOD( kt,nn_writefl) == 0 ) THEN 78 79 ! header of output floats file 80 81 IF(lwp) THEN 82 WRITE(numout,*) 83 WRITE(numout,*) 'flo_wri : write in trajec_float file ' 84 WRITE(numout,*) '~~~~~~~ ' 85 ENDIF 86 87 ! open the file numflo 88 CALL ctl_opn( numflo, 'trajec_float', 'REPLACE', 'UNFORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 89 90 IF( kt == nit000 ) THEN 91 irecflo = NINT( (nitend-nit000) / FLOAT(nn_writefl) ) 92 IF(lwp) WRITE(numflo)cexper,no,irecflo,jpnfl,nn_writefl 93 ENDIF 94 zdtj = rdt / 86400._wp 95 96 ! translation of index position in geographical position 99 !----------------------------------------------------- 100 ! I- Save positions, temperature, salinty and density 101 !----------------------------------------------------- 102 zlon(:)=0.0 ; zlat(:)=0.0 ; zdep(:)=0.0 103 ztem(:)=0.0 ; zsal(:)=0.0 ; zrho(:)=0.0 104 105 DO jfl = 1, jpnfl 106 107 iafl = INT (tpifl(jfl)) ! I-index of the nearest point before 108 ibfl = INT (tpjfl(jfl)) ! J-index of the nearest point before 109 icfl = INT (tpkfl(jfl)) ! K-index of the nearest point before 110 ia1fl = iafl + 1 ! I-index of the nearest point after 111 ib1fl = ibfl + 1 ! J-index of the nearest point after 112 ic1fl = icfl + 1 ! K-index of the nearest point after 113 zafl = tpifl(jfl) - REAL(iafl,wp) ! distance ????? 114 zbfl = tpjfl(jfl) - REAL(ibfl,wp) ! distance ????? 115 zcfl = tpkfl(jfl) - REAL(icfl,wp) ! distance ????? 97 116 98 117 IF( lk_mpp ) THEN 99 DO jfl = 1, jpnfl 100 iafl = INT ( tpifl(jfl) ) 101 ibfl = INT ( tpjfl(jfl) ) 102 icfl = INT ( tpkfl(jfl) ) 103 iafln = NINT( tpifl(jfl) ) 104 ibfln = NINT( tpjfl(jfl) ) 105 ia1fl = iafl + 1 106 ib1fl = ibfl + 1 107 ic1fl = icfl + 1 108 zafl = tpifl(jfl) - FLOAT( iafl ) 109 zbfl = tpjfl(jfl) - FLOAT( ibfl ) 110 zcfl = tpkfl(jfl) - FLOAT( icfl ) 111 IF( iafl >= mig(nldi)-jpizoom+1 .AND. iafl <= mig(nlei)-jpizoom+1 .AND. & 112 & ibfl >= mjg(nldj)-jpjzoom+1 .AND. ibfl <= mjg(nlej)-jpjzoom+1 ) THEN 113 114 ! local index 115 116 iafloc = iafl -(mig(1)-jpizoom+1) + 1 117 ibfloc = ibfl -(mjg(1)-jpjzoom+1) + 1 118 ia1floc = iafloc + 1 119 ib1floc = ibfloc + 1 120 121 flyy(jfl) = (1.-zafl)*(1.-zbfl)*gphit(iafloc ,ibfloc ) + (1.-zafl) * zbfl * gphit(iafloc ,ib1floc) & 122 & + zafl *(1.-zbfl)*gphit(ia1floc,ibfloc ) + zafl * zbfl * gphit(ia1floc,ib1floc) 123 flxx(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc) & 124 & + zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) + zafl * zbfl * glamt(ia1floc,ib1floc) 125 flzz(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl) 126 127 ! Change by Alexandra Bozec et Jean-Philippe Boulanger 128 ! We save the instantaneous profile of T and S of the column 129 ! ztemp(jfl)=tsn(iafloc,ibfloc,icfl,jp_tem) 130 ! zsal(jfl)=tsn(iafloc,ibfloc,icfl,jp_sal) 131 ztemp(1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_tem) 132 zsal (1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_sal) 133 ELSE 134 flxx(jfl) = 0. 135 flyy(jfl) = 0. 136 flzz(jfl) = 0. 137 ztemp(1:jpk,jfl) = 0. 138 zsal (1:jpk,jfl) = 0. 139 ENDIF 140 END DO 141 142 CALL mpp_sum( flxx, jpnfl ) ! sums over the global domain 143 CALL mpp_sum( flyy, jpnfl ) 144 CALL mpp_sum( flzz, jpnfl ) 145 ! these 2 lines have accendentaly been removed from ATL6-V8 run hence 146 ! giving 0 salinity and temperature on the float trajectory 147 !bug RB 148 !compilation failed in mpp 149 ! CALL mpp_sum( ztemp, jpk*jpnfl ) 150 ! CALL mpp_sum( zsal , jpk*jpnfl ) 151 152 ELSE 153 DO jfl = 1, jpnfl 154 iafl = INT (tpifl(jfl)) 155 ibfl = INT (tpjfl(jfl)) 156 icfl = INT (tpkfl(jfl)) 157 iafln = NINT(tpifl(jfl)) 158 ibfln = NINT(tpjfl(jfl)) 159 ia1fl = iafl+1 160 ib1fl = ibfl+1 161 ic1fl = icfl+1 162 zafl = tpifl(jfl) - FLOAT(iafl) 163 zbfl = tpjfl(jfl) - FLOAT(ibfl) 164 zcfl = tpkfl(jfl) - FLOAT(icfl) 165 iafloc = iafl 166 ibfloc = ibfl 118 119 iafloc = mi1( iafl ) 120 ibfloc = mj1( ibfl ) 121 122 IF( nldi <= iafloc .AND. iafloc <= nlei .AND. & 123 & nldj <= ibfloc .AND. ibfloc <= nlej ) THEN 124 125 !the float is inside of current proc's area 167 126 ia1floc = iafloc + 1 168 127 ib1floc = ibfloc + 1 169 ! 170 flyy(jfl) = (1.-zafl)*(1.-zbfl)*gphit(iafloc ,ibfloc ) + (1.-zafl) * zbfl * gphit(iafloc ,ib1floc) & 171 + zafl *(1.-zbfl)*gphit(ia1floc,ibfloc ) + zafl * zbfl * gphit(ia1floc,ib1floc) 172 flxx(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc) & 173 + zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) + zafl * zbfl * glamt(ia1floc,ib1floc) 174 flzz(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl) 175 !ALEX 176 ! Astuce pour ne pas avoir des flotteurs qui se baladent sur IDL 177 zxxu_11 = glamt(iafloc ,ibfloc ) 178 zxxu_10 = glamt(iafloc ,ib1floc) 179 zxxu_01 = glamt(ia1floc,ibfloc ) 180 zxxu = glamt(ia1floc,ib1floc) 181 182 IF( iafloc == 52 ) zxxu_10 = -181 183 IF( iafloc == 52 ) zxxu_11 = -181 184 flxx(jfl)=(1.-zafl)*(1.-zbfl)* zxxu_11 + (1.-zafl)* zbfl * zxxu_10 & 185 + zafl *(1.-zbfl)* zxxu_01 + zafl * zbfl * zxxu 186 !ALEX 187 ! Change by Alexandra Bozec et Jean-Philippe Boulanger 188 ! We save the instantaneous profile of T and S of the column 189 ! ztemp(jfl)=tsn(iafloc,ibfloc,icfl,jp_tem) 190 ! zsal(jfl)=tsn(iafloc,ibfloc,icfl,jp_sal) 191 ztemp(1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_tem) 192 zsal (1:jpk,jfl) = tsn(iafloc,ibfloc,1:jpk,jp_sal) 193 END DO 128 129 !save position of the float 130 zlat(jfl) = (1.-zafl)*(1.-zbfl)*gphit(iafloc ,ibfloc ) + (1.-zafl) * zbfl * gphit(iafloc ,ib1floc) & 131 + zafl *(1.-zbfl)*gphit(ia1floc,ibfloc ) + zafl * zbfl * gphit(ia1floc,ib1floc) 132 zlon(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc) & 133 + zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) + zafl * zbfl * glamt(ia1floc,ib1floc) 134 zdep(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl) 135 136 !save temperature, salinity and density at this position 137 ztem(jfl) = tsn(iafloc,ibfloc,icfl,jp_tem) 138 zsal (jfl) = tsn(iafloc,ibfloc,icfl,jp_sal) 139 zrho (jfl) = (rhd(iafloc,ibfloc,icfl)+1)*rau0 140 141 ENDIF 142 143 ELSE ! mono proc case 144 145 iafloc = iafl 146 ibfloc = ibfl 147 ia1floc = iafloc + 1 148 ib1floc = ibfloc + 1 149 150 !save position of the float 151 zlat(jfl) = (1.-zafl)*(1.-zbfl)*gphit(iafloc ,ibfloc ) + (1.-zafl) * zbfl * gphit(iafloc ,ib1floc) & 152 + zafl *(1.-zbfl)*gphit(ia1floc,ibfloc ) + zafl * zbfl * gphit(ia1floc,ib1floc) 153 zlon(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc) & 154 + zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) + zafl * zbfl * glamt(ia1floc,ib1floc) 155 zdep(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl) 156 157 ztem(jfl) = tsn(iafloc,ibfloc,icfl,jp_tem) 158 zsal(jfl) = tsn(iafloc,ibfloc,icfl,jp_sal) 159 zrho(jfl) = (rhd(iafloc,ibfloc,icfl)+1)*rau0 160 194 161 ENDIF 195 162 196 ! 197 WRITE(numflo) flxx,flyy,flzz,nisobfl,ngrpfl,ztemp,zsal, FLOAT(ndastp) 198 !! 199 !! case when profiles are dumped. In order to save memory, dumps are 200 !! done level by level. 201 ! IF (mod(kt,nflclean) == 0.) THEN 202 !! IF ( nwflo == nwprofil ) THEN 203 ! DO jk = 1,jpk 204 ! DO jfl=1,jpnfl 205 ! iafl= INT(tpifl(jfl)) 206 ! ibfl=INT(tpjfl(jfl)) 207 ! iafln=NINT(tpifl(jfl)) 208 ! ibfln=NINT(tpjfl(jfl)) 209 !# if defined key_mpp_mpi 210 ! IF ( (iafl >= (mig(nldi)-jpizoom+1)) .AND. 211 ! $ (iafl <= (mig(nlei)-jpizoom+1)) .AND. 212 ! $ (ibfl >= (mjg(nldj)-jpjzoom+1)) .AND. 213 ! $ (ibfl <= (mjg(nlej)-jpjzoom+1)) ) THEN 214 !! 215 !! local index 216 !! 217 ! iafloc=iafln-(mig(1)-jpizoom+1)+1 218 ! ibfloc=ibfln-(mjg(1)-jpjzoom+1)+1 219 !! IF (jk == 1 ) THEN 220 !! PRINT *,'<<<>>> ',jfl,narea, iafloc ,ibfloc, iafln, ibfln,adatrj 221 !! ENDIF 222 !# else 223 ! iafloc=iafln 224 ! ibfloc=ibfln 225 !# endif 226 ! ztemp(jfl)=tsn(iafloc,ibfloc,jk,jp_tem) 227 ! zsal(jfl)=tsn(iaflo!,ibfloc,jk,jp_sal) 228 !# if defined key_mpp_mpi 229 ! ELSE 230 ! ztemp(jfl) = 0. 231 ! zsal(jfl) = 0. 232 ! ENDIF 233 !# endif 234 !! ... next float 235 ! END DO 236 ! IF( lk_mpp ) CALL mpp_sum( ztemp, jpnfl ) 237 ! IF( lk_mpp ) CALL mpp_sum( zsal , jpnfl ) 238 ! 239 ! IF (lwp) THEN 240 ! WRITE(numflo) ztemp, zsal 241 ! ENDIF 242 !! ... next level jk 243 ! END DO 244 !! ... reset nwflo to 0 for ALL processors, if profile has been written 245 !! nwflo = 0 246 ! ENDIF 247 !! 248 ! CALL flush (numflo) 249 !! ... time of dumping floats 250 !! END IF 163 END DO ! loop on float 164 165 !Only proc 0 writes all positions : SUM of positions on all procs 166 IF( lk_mpp ) THEN 167 CALL mpp_sum( zlon, jpnfl ) ! sums over the global domain 168 CALL mpp_sum( zlat, jpnfl ) ! sums over the global domain 169 CALL mpp_sum( zdep, jpnfl ) ! sums over the global domain 170 CALL mpp_sum( ztem, jpnfl ) ! sums over the global domain 171 CALL mpp_sum( zsal, jpnfl ) ! sums over the global domain 172 CALL mpp_sum( zrho, jpnfl ) ! sums over the global domain 251 173 ENDIF 252 253 IF( (MOD(kt,nn_stockfl) == 0) .OR. ( kt == nitend ) ) THEN 254 ! Writing the restart file 255 IF(lwp) THEN 256 WRITE(numout,*) 257 WRITE(numout,*) 'flo_wri : write in restart_float file ' 258 WRITE(numout,*) '~~~~~~~ ' 174 175 176 !-------------------------------------! 177 ! II- WRITE WRITE WRITE WRITE WRITE ! 178 !-------------------------------------! 179 180 !--------------------------! 181 ! II-1 Write in ascii file ! 182 !--------------------------! 183 184 IF( ln_flo_ascii )THEN 185 186 IF( ( kt == nn_it000 .OR. MOD( kt,nn_writefl)== 0 ) .AND. lwp )THEN 187 188 !II-1-a Open ascii file 189 !---------------------- 190 IF( kt == nn_it000 ) THEN 191 CALL ctl_opn( numflo, 'trajec_float', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 192 irecflo = NINT( (nitend-nn_it000) / FLOAT(nn_writefl) ) 193 WRITE(numflo,*)cexper,no,irecflo,jpnfl,nn_writefl 194 ENDIF 195 196 !II-1-b Write in ascii file 197 !----------------------------- 198 WRITE(numflo,*) zlon,zlat,zdep,nisobfl,ngrpfl,ztem,zsal, FLOAT(ndastp) 199 200 201 !II-1-c Close netcdf file 202 !------------------------- 203 IF( kt == nitend ) CLOSE( numflo ) 204 259 205 ENDIF 260 206 261 ! file is opened and closed every time it is used. 262 263 clname = 'restart.float.' 264 ic = 1 265 DO jc = 1, 16 266 IF( cexper(jc:jc) /= ' ' ) ic = jc 267 END DO 268 clname = clname(1:14)//cexper(1:ic) 269 ic = 1 270 DO jc = 1, 48 271 IF( clname(jc:jc) /= ' ' ) ic = jc 272 END DO 273 274 CALL ctl_opn( inum, clname, 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 275 REWIND inum 276 ! 277 DO jpn = 1, jpnij 278 iproc(jpn) = 0 279 END DO 280 ! 281 IF(lwp) THEN 282 REWIND(inum) 283 WRITE (inum) tpifl,tpjfl,tpkfl,nisobfl,ngrpfl 284 CLOSE (inum) 207 !----------------------------------------------------- 208 ! II-2 Write in netcdf file 209 !----------------------------------------------------- 210 211 ELSE 212 213 !II-2-a Write with IOM 214 !---------------------- 215 216 #if defined key_iomput 217 CALL iom_put( "traj_lon" , zlon ) 218 CALL iom_put( "traj_lat" , zlat ) 219 CALL iom_put( "traj_dep" , zdep ) 220 CALL iom_put( "traj_temp" , ztem ) 221 CALL iom_put( "traj_salt" , zsal ) 222 CALL iom_put( "traj_dens" , zrho ) 223 CALL iom_put( "traj_group" , REAL(ngrpfl,wp) ) 224 #else 225 226 !II-2-b Write with IOIPSL 227 !------------------------ 228 229 IF( ( kt == nn_it000 .OR. MOD( kt,nn_writefl)== 0 ) .AND. lwp )THEN 230 231 232 !II-2-b-1 Open netcdf file 233 !------------------------- 234 IF( kt==nn_it000 )THEN ! Create and open 235 236 CALL dia_nam( clname, nn_writefl, 'trajec_float' ) 237 clname=TRIM(clname)//".nc" 238 239 CALL fliocrfd( clname , (/ 'ntraj' , 't' /), (/ jpnfl , -1 /) , numflo ) 240 241 CALL fliodefv( numflo, 'traj_lon' , (/1,2/), v_t=flio_r8, long_name="Longitude" , units="degrees_east" ) 242 CALL fliodefv( numflo, 'traj_lat' , (/1,2/), v_t=flio_r8, long_name="Latitude" , units="degrees_north" ) 243 CALL fliodefv( numflo, 'traj_depth' , (/1,2/), v_t=flio_r8, long_name="Depth" , units="meters" ) 244 CALL fliodefv( numflo, 'time_counter', (/2/) , v_t=flio_r8, long_name="Time axis" & 245 & , units="seconds since start of the run " ) 246 CALL fliodefv( numflo, 'traj_temp' , (/1,2/), v_t=flio_r8, long_name="Temperature" , units="C" ) 247 CALL fliodefv( numflo, 'traj_salt' , (/1,2/), v_t=flio_r8, long_name="Salinity" , units="PSU" ) 248 CALL fliodefv( numflo, 'traj_dens' , (/1,2/), v_t=flio_r8, long_name="Density" , units="kg/m3" ) 249 CALL fliodefv( numflo, 'traj_group' , (/1/) , v_t=flio_r8, long_name="number of the group" , units="no unit" ) 250 251 CALL flioputv( numflo , 'traj_group' , REAL(ngrpfl,wp) ) 252 253 ELSE ! Re-open 254 255 CALL flioopfd( TRIM(clname), numflo , "WRITE" ) 256 257 ENDIF 258 259 !II-2-b-2 Write in netcdf file 260 !------------------------------- 261 irec = INT( (kt-nn_it000+1)/nn_writefl ) +1 262 ztime = ( kt-nn_it000 + 1 ) * rdt 263 264 CALL flioputv( numflo , 'time_counter', ztime , start=(/irec/) ) 265 266 DO jfl = 1, jpnfl 267 268 istart = (/jfl,irec/) 269 icfl = INT( tpkfl(jfl) ) ! K-index of the nearest point before 270 271 CALL flioputv( numflo , 'traj_lon' , zlon(jfl) , start=istart ) 272 CALL flioputv( numflo , 'traj_lat' , zlat(jfl) , start=istart ) 273 CALL flioputv( numflo , 'traj_depth' , zdep(jfl) , start=istart ) 274 CALL flioputv( numflo , 'traj_temp' , ztemp(icfl,jfl) , start=istart ) 275 CALL flioputv( numflo , 'traj_salt' , zsal(icfl,jfl) , start=istart ) 276 CALL flioputv( numflo , 'traj_dens' , zrho(icfl,jfl) , start=istart ) 277 278 ENDDO 279 280 !II-2-b-3 Close netcdf file 281 !--------------------------- 282 CALL flioclo( numflo ) 283 285 284 ENDIF 286 ! 287 ! Compute the number of trajectories for each processor 288 ! 289 IF( lk_mpp ) THEN 290 DO jfl = 1, jpnfl 291 IF( (INT(tpifl(jfl)) >= (mig(nldi)-jpizoom+1)) .AND. & 292 &(INT(tpifl(jfl)) <= (mig(nlei)-jpizoom+1)) .AND. & 293 &(INT(tpjfl(jfl)) >= (mjg(nldj)-jpjzoom+1)) .AND. & 294 &(INT(tpjfl(jfl)) <= (mjg(nlej)-jpjzoom+1)) ) THEN 295 iproc(narea) = iproc(narea)+1 296 ENDIF 297 END DO 298 CALL mpp_sum( iproc, jpnij ) 299 ! 300 IF(lwp) THEN 301 WRITE(numout,*) 'DATE',adatrj 302 DO jpn = 1, jpnij 303 IF( iproc(jpn) /= 0 ) THEN 304 WRITE(numout,*)'PROCESSOR',jpn-1,'compute',iproc(jpn), 'trajectories.' 305 ENDIF 306 END DO 307 ENDIF 308 ENDIF 309 ENDIF 310 311 IF( kt == nitend ) CLOSE( numflo ) 312 ! 285 286 #endif 287 ENDIF ! netcdf writing 288 313 289 END SUBROUTINE flo_wri 290 314 291 315 292 # else … … 321 298 END SUBROUTINE flo_wri 322 299 #endif 323 324 !!====================================================================== 300 301 !!======================================================================= 325 302 END MODULE flowri -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r2715 r3104 105 105 !! logical units 106 106 !!---------------------------------------------------------------------- 107 INTEGER :: numstp = -1 !: logical unit for time step 108 INTEGER :: numout = 6 !: logical unit for output print 109 INTEGER :: numnam = -1 !: logical unit for namelist 110 INTEGER :: numnam_ice = -1 !: logical unit for ice namelist 111 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution) 112 INTEGER :: numsol = -1 !: logical unit for solver statistics 107 INTEGER :: numstp = -1 !: logical unit for time step 108 INTEGER :: numout = 6 !: logical unit for output print 109 INTEGER :: numnam = -1 !: logical unit for namelist 110 INTEGER :: numnam_ice = -1 !: logical unit for ice namelist 111 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution) 112 INTEGER :: numsol = -1 !: logical unit for solver statistics 113 INTEGER :: numdct_in = -1 !: logical unit for transports computing 114 INTEGER :: numdct_vol = -1 !: logical unit for voulume transports output 115 INTEGER :: numdct_heat = -1 !: logical unit for heat transports output 116 INTEGER :: numdct_salt = -1 !: logical unit for salt transports output 117 INTEGER :: numfl = -1 !: logical unit for floats ascii output 118 INTEGER :: numflo = -1 !: logical unit for floats ascii output 113 119 114 120 !!---------------------------------------------------------------------- -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r2715 r3104 19 19 !!-------------------------------------------------------------------- 20 20 USE dom_oce ! ocean space and time domain 21 USE flo_oce ! floats module declarations 21 22 USE lbclnk ! lateal boundary condition / mpp exchanges 22 23 USE iom_def ! iom variables definitions … … 48 49 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 49 50 PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d 50 PRIVATE iom_p 2d, iom_p3d51 PRIVATE iom_p1d, iom_p2d, iom_p3d 51 52 #if defined key_iomput 52 53 PRIVATE set_grid … … 63 64 END INTERFACE 64 65 INTERFACE iom_put 65 MODULE PROCEDURE iom_p0d, iom_p 2d, iom_p3d66 MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 66 67 END INTERFACE 67 68 #if defined key_iomput … … 115 116 CALL event__set_vert_axis( "depthv", gdept_0 ) 116 117 CALL event__set_vert_axis( "depthw", gdepw_0 ) 118 # if defined key_floats 119 CALL event__set_vert_axis( "nfloat", REAL(nfloat,wp) ) 120 # endif 117 121 118 122 ! automatic definitions of some of the xml attributs … … 961 965 #endif 962 966 END SUBROUTINE iom_p0d 967 968 SUBROUTINE iom_p1d( cdname, pfield1d ) 969 CHARACTER(LEN=*) , INTENT(in) :: cdname 970 REAL(wp), DIMENSION(:), INTENT(in) :: pfield1d 971 INTEGER :: jpz 972 #if defined key_iomput 973 jpz=SIZE(pfield1d) 974 CALL event__write_field3D( cdname, RESHAPE( (/pfield1d/), (/1,1,jpz/) ) ) 975 #else 976 IF( .FALSE. ) WRITE(numout,*) cdname, pfield1d ! useless test to avoid compilation warnings 977 #endif 978 END SUBROUTINE iom_p1d 963 979 964 980 SUBROUTINE iom_p2d( cdname, pfield2d ) -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r2715 r3104 33 33 LOGICAL , PUBLIC :: ln_blk_clio = .FALSE. !: CLIO bulk formulation 34 34 LOGICAL , PUBLIC :: ln_blk_core = .FALSE. !: CORE bulk formulation 35 LOGICAL , PUBLIC :: ln_blk_ecmwf= .FALSE. !: MFS bulk formulation 35 36 LOGICAL , PUBLIC :: ln_cpl = .FALSE. !: coupled formulation (overwritten by key_sbc_coupled ) 36 37 LOGICAL , PUBLIC :: ln_dm2dc = .FALSE. !: Daily mean to Diurnal Cycle short wave (qsr) … … 43 44 ! !: = 1 global mean of e-p-r set to zero at each nn_fsbc time step 44 45 ! !: = 2 annual global mean of e-p-r set to zero 46 LOGICAL , PUBLIC :: ln_cdgw = .FALSE. !: true if neutral drag coefficient read from wave model 45 47 46 48 !!---------------------------------------------------------------------- -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r2777 r3104 34 34 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 35 35 USE prtctl ! Print control 36 USE sbcwave,ONLY : cdn_wave !wave module 36 37 #if defined key_lim3 37 38 USE sbc_ice ! Surface boundary condition: ice fields … … 43 44 PUBLIC sbc_blk_core ! routine called in sbcmod module 44 45 PUBLIC blk_ice_core ! routine called in sbc_ice_lim module 46 PUBLIC turb_core_2z ! routine calles in sbcblk_ecmwf module 45 47 46 48 INTEGER , PARAMETER :: jpfld = 9 ! maximum number of files to read … … 682 684 !! Neutral Drag Coefficient 683 685 stab = 0.5 + sign(0.5,dT) ! stable : stab = 1 ; unstable : stab = 0 684 Cd_n10 = 1E-3 * ( 2.7/dU10 + 0.142 + dU10/13.09 ) ! L & Y eq. (6a) 686 IF ( ln_cdgw ) THEN 687 cdn_wave = cdn_wave - rsmall*(tmask(:,:,1)-1) 688 Cd_n10(:,:) = cdn_wave 689 ELSE 690 Cd_n10 = 1E-3 * ( 2.7/dU10 + 0.142 + dU10/13.09 ) ! L & Y eq. (6a) 691 ENDIF 685 692 sqrt_Cd_n10 = sqrt(Cd_n10) 686 693 Ce_n10 = 1E-3 * ( 34.6 * sqrt_Cd_n10 ) ! L & Y eq. (6b) … … 705 712 zpsi_m = psi_m(zeta) 706 713 707 !! Shifting the wind speed to 10m and neutral stability : 708 U_n10 = dU10*1./(1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m)) ! L & Y eq. (9a) 709 710 !! Updating the neutral 10m transfer coefficients : 711 Cd_n10 = 1E-3 * (2.7/U_n10 + 0.142 + U_n10/13.09) ! L & Y eq. (6a) 712 sqrt_Cd_n10 = sqrt(Cd_n10) 713 Ce_n10 = 1E-3 * (34.6 * sqrt_Cd_n10) ! L & Y eq. (6b) 714 stab = 0.5 + sign(0.5,zeta) 715 Ch_n10 = 1E-3*sqrt_Cd_n10*(18.*stab + 32.7*(1-stab)) ! L & Y eq. (6c), (6d) 716 717 !! Shifting the neutral 10m transfer coefficients to ( zu , zeta ) : 718 !! 719 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10) - zpsi_m) 720 Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 714 IF ( ln_cdgw ) THEN 715 sqrt_Cd=kappa/((kappa/sqrt_Cd_n10) - zpsi_m) ; Cd=sqrt_Cd*sqrt_Cd; 716 ELSE 717 !! Shifting the wind speed to 10m and neutral stability : 718 U_n10 = dU10*1./(1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m)) ! L & Y eq. (9a) 719 720 !! Updating the neutral 10m transfer coefficients : 721 Cd_n10 = 1E-3 * (2.7/U_n10 + 0.142 + U_n10/13.09) ! L & Y eq. (6a) 722 sqrt_Cd_n10 = sqrt(Cd_n10) 723 Ce_n10 = 1E-3 * (34.6 * sqrt_Cd_n10) ! L & Y eq. (6b) 724 stab = 0.5 + sign(0.5,zeta) 725 Ch_n10 = 1E-3*sqrt_Cd_n10*(18.*stab + 32.7*(1-stab)) ! L & Y eq. (6c), (6d) 726 727 !! Shifting the neutral 10m transfer coefficients to ( zu , zeta ) : 728 !! 729 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10) - zpsi_m) 730 Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 731 ENDIF 721 732 !! 722 733 xlogt = log(zu/10.) - zpsi_h … … 812 823 !! Neutral Drag Coefficient : 813 824 stab = 0.5 + sign(0.5,dT) ! stab = 1 if dT > 0 -> STABLE 814 Cd_n10 = 1E-3*( 2.7/dU10 + 0.142 + dU10/13.09 ) 825 IF( ln_cdgw ) THEN 826 cdn_wave = cdn_wave - rsmall*(tmask(:,:,1)-1) 827 Cd_n10(:,:) = cdn_wave 828 ELSE 829 Cd_n10 = 1E-3*( 2.7/dU10 + 0.142 + dU10/13.09 ) 830 ENDIF 815 831 sqrt_Cd_n10 = sqrt(Cd_n10) 816 832 Ce_n10 = 1E-3*( 34.6 * sqrt_Cd_n10 ) … … 853 869 stab = 0.5 + sign(0.5,q_zu) ; q_zu = stab*q_zu 854 870 !! 855 !! Updating the neutral 10m transfer coefficients : 856 Cd_n10 = 1E-3 * (2.7/U_n10 + 0.142 + U_n10/13.09) ! L & Y eq. (6a) 857 sqrt_Cd_n10 = sqrt(Cd_n10) 858 Ce_n10 = 1E-3 * (34.6 * sqrt_Cd_n10) ! L & Y eq. (6b) 859 stab = 0.5 + sign(0.5,zeta_u) 860 Ch_n10 = 1E-3*sqrt_Cd_n10*(18.*stab + 32.7*(1-stab)) ! L & Y eq. (6c-6d) 861 !! 862 !! 863 !! Shifting the neutral 10m transfer coefficients to (zu,zeta_u) : 864 ! xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - psi_m(zeta_u)) 865 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m) 866 Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 867 !! 868 ! xlogt = log(zu/10.) - psi_h(zeta_u) 871 IF( ln_cdgw ) THEN 872 sqrt_Cd=kappa/((kappa/sqrt_Cd_n10) - zpsi_m) ; Cd=sqrt_Cd*sqrt_Cd; 873 ELSE 874 !! Updating the neutral 10m transfer coefficients : 875 Cd_n10 = 1E-3 * (2.7/U_n10 + 0.142 + U_n10/13.09) ! L & Y eq. (6a) 876 sqrt_Cd_n10 = sqrt(Cd_n10) 877 Ce_n10 = 1E-3 * (34.6 * sqrt_Cd_n10) ! L & Y eq. (6b) 878 stab = 0.5 + sign(0.5,zeta_u) 879 Ch_n10 = 1E-3*sqrt_Cd_n10*(18.*stab + 32.7*(1-stab)) ! L & Y eq. (6c-6d) 880 !! 881 !! 882 !! Shifting the neutral 10m transfer coefficients to (zu,zeta_u) : 883 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m) 884 Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 885 ENDIF 886 !! 869 887 xlogt = log(zu/10.) - zpsi_hu 870 888 !! -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r2977 r3104 29 29 USE sbcblk_clio ! surface boundary condition: bulk formulation : CLIO 30 30 USE sbcblk_core ! surface boundary condition: bulk formulation : CORE 31 USE sbcblk_ecmwf ! surface boundary condition: bulk formulation : MFS 31 32 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 32 33 USE sbcice_lim ! surface boundary condition: LIM 3.0 sea-ice model … … 46 47 USE in_out_manager ! I/O manager 47 48 USE lib_mpp ! MPP library 49 USE sbcwave ! Wave module 48 50 49 51 IMPLICIT NONE … … 78 80 !! 79 81 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx , ln_blk_clio, ln_blk_core, ln_cpl, & 80 & ln_ apr_dyn, nn_ice , ln_dm2dc, ln_rnf , ln_ssr , nn_fwb82 & ln_blk_ecmwf, ln_apr_dyn, nn_ice , ln_dm2dc, ln_rnf, ln_ssr , nn_fwb, ln_cdgw 81 83 !!---------------------------------------------------------------------- 82 84 … … 107 109 WRITE(numout,*) ' flux formulation ln_flx = ', ln_flx 108 110 WRITE(numout,*) ' CLIO bulk formulation ln_blk_clio = ', ln_blk_clio 109 WRITE(numout,*) ' CLIO bulk formulation ln_blk_core = ', ln_blk_core 111 WRITE(numout,*) ' CORE bulk formulation ln_blk_core = ', ln_blk_core 112 WRITE(numout,*) ' MFS bulk formulation ln_blk_ecmwf= ', ln_blk_ecmwf 110 113 WRITE(numout,*) ' coupled formulation (T if key_sbc_cpl) ln_cpl = ', ln_cpl 111 114 WRITE(numout,*) ' Misc. options of sbc : ' … … 154 157 IF( ln_dm2dc .AND. ( ( NINT(rday) / ( nn_fsbc * NINT(rdt) ) ) < 8 ) ) & 155 158 & CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 159 160 !drag coefficient read from wave model definable only with ecmwf bulk formulae and core 161 IF(ln_cdgw .AND. .NOT.(ln_blk_ecmwf .OR. ln_blk_core) ) & 162 & CALL ctl_stop( 'drag coefficient read from wave model definable only with ecmwf bulk formulae and core') 156 163 157 164 ! ! Choice of the Surface Boudary Condition (set nsbc) … … 161 168 IF( ln_blk_clio ) THEN ; nsbc = 3 ; icpt = icpt + 1 ; ENDIF ! CLIO bulk formulation 162 169 IF( ln_blk_core ) THEN ; nsbc = 4 ; icpt = icpt + 1 ; ENDIF ! CORE bulk formulation 170 IF( ln_blk_ecmwf ) THEN ; nsbc = 6 ; icpt = icpt + 1 ; ENDIF ! MFS bulk formulation 163 171 IF( ln_cpl ) THEN ; nsbc = 5 ; icpt = icpt + 1 ; ENDIF ! Coupled formulation 164 172 IF( cp_cfg == 'gyre') THEN ; nsbc = 0 ; ENDIF ! GYRE analytical formulation … … 181 189 IF( nsbc == 4 ) WRITE(numout,*) ' CORE bulk formulation' 182 190 IF( nsbc == 5 ) WRITE(numout,*) ' coupled formulation' 191 IF( nsbc == 6 ) WRITE(numout,*) ' MFS Bulk formulation' 183 192 ENDIF 184 193 ! … … 228 237 ! ! averaged over nf_sbc time-step 229 238 239 IF (ln_cdgw) CALL sbc_wave( kt ) 230 240 !== sbc formulation ==! 231 241 … … 238 248 CASE( 4 ) ; CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean 239 249 CASE( 5 ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! coupled formulation 250 CASE( 6 ) ; CALL sbc_blk_ecmwf( kt ) ! bulk formulation : MFS for the ocean 240 251 CASE( -1 ) 241 252 CALL sbc_ana ( kt ) ! ESOPA, test ALL the formulations -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
r2715 r3104 7 7 !! History : OPA ! 1987-09 (P. Andrich) Original code 8 8 !! 4.0 ! 1991-11 (G. Madec) 9 !! 7.0 ! 1996-01 (G. Madec) complet rewriting of multitasking suppression of common work arrays10 !! 8.0 ! 1997-06 (G. Madec) complete rewriting of zdfmix9 !! 7.0 ! 1996-01 (G. Madec) complete rewriting of multitasking suppression of common work arrays 10 !! 8.0 ! 1997-06 (G. Madec) complete rewriting of zdfmix 11 11 !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module 12 12 !! 3.3 ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase 13 !! 3.3.1! 2011-09 (P. Oddo) Mixed layer depth parameterization 13 14 !!---------------------------------------------------------------------- 14 15 #if defined key_zdfric || defined key_esopa … … 20 21 !! zdf_ric_init : initialization, namelist read, & parameters control 21 22 !!---------------------------------------------------------------------- 22 USE oce ! ocean dynamics and tracers variables 23 USE dom_oce ! ocean space and time domain variables 24 USE zdf_oce ! ocean vertical physics 25 USE in_out_manager ! I/O manager 26 USE lbclnk ! ocean lateral boundary condition (or mpp link) 27 USE lib_mpp ! MPP library 23 USE oce ! ocean dynamics and tracers variables 24 USE dom_oce ! ocean space and time domain variables 25 USE zdf_oce ! ocean vertical physics 26 USE in_out_manager ! I/O manager 27 USE lbclnk ! ocean lateral boundary condition (or mpp link) 28 USE lib_mpp ! MPP library 29 USE eosbn2, ONLY : nn_eos 28 30 29 31 IMPLICIT NONE … … 39 41 REAL(wp) :: rn_avmri = 100.e-4_wp ! maximum value of the vertical eddy viscosity 40 42 REAL(wp) :: rn_alp = 5._wp ! coefficient of the parameterization 43 REAL(wp) :: rn_ekmfc = 0.7_wp ! Ekman Factor Coeff 44 REAL(wp) :: rn_mldmin= 1.0_wp ! minimum mixed layer (ML) depth 45 REAL(wp) :: rn_mldmax=1000.0_wp ! maximum mixed layer depth 46 REAL(wp) :: rn_wtmix = 10.0_wp ! Vertical eddy Diff. in the ML 47 REAL(wp) :: rn_wvmix = 10.0_wp ! Vertical eddy Visc. in the ML 48 LOGICAL :: ln_mldw = .TRUE. ! Use or not the MLD parameters 41 49 42 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tmric !: coef. for the horizontal mean at t-point … … 67 75 !! 68 76 !! ** Purpose : Compute the before eddy viscosity and diffusivity as 69 !! a function of the local richardson number.77 !! a function of the local richardson number. 70 78 !! 71 79 !! ** Method : Local richardson number dependent formulation of the 72 !! vertical eddy viscosity and diffusivity coefficients.80 !! vertical eddy viscosity and diffusivity coefficients. 73 81 !! The eddy coefficients are given by: 74 82 !! avm = avm0 + avmb 75 83 !! avt = avm0 / (1 + rn_alp*ri) 76 !! with ri = N^2 / dz(u)**277 !! = e3w**2 * rn2/[ mi( dk(ub) )+mj( dk(vb) ) ]78 !! avm0= rn_avmri / (1 + rn_alp*ri)**nn_ric84 !! with ri = N^2 / dz(u)**2 85 !! = e3w**2 * rn2/[ mi( dk(ub) )+mj( dk(vb) ) ] 86 !! avm0= rn_avmri / (1 + rn_alp*ri)**nn_ric 79 87 !! Where ri is the before local Richardson number, 80 88 !! rn_avmri is the maximum value reaches by avm and avt … … 84 92 !! avtb=1.e-7 m2/s, rn_alp=5. and nn_ric=2. 85 93 !! a numerical threshold is impose on the vertical shear (1.e-20) 94 !! As second step compute Ekman depth from wind stress forcing 95 !! and apply namelist provided vertical coeff within this depth. 96 !! The Ekman depth is: 97 !! Ustar = SQRT(Taum/rho0) 98 !! ekd= rn_ekmfc * Ustar / f0 99 !! Large et al. (1994, eq.29) suggest rn_ekmfc=0.7; however, the derivation 100 !! of the above equation indicates the value is somewhat arbitrary; therefore 101 !! we allow the freedom to increase or decrease this value, if the 102 !! Ekman depth estimate appears too shallow or too deep, respectively. 103 !! Ekd is then limited by rn_mldmin and rn_mldmax provided in the 104 !! namelist 86 105 !! N.B. the mask are required for implicit scheme, and surface 87 106 !! and bottom value already set in zdfini.F90 88 107 !! 89 108 !! References : Pacanowski & Philander 1981, JPO, 1441-1451. 109 !! PFJ Lermusiaux 2001. 90 110 !!---------------------------------------------------------------------- 91 111 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 92 USE wrk_nemo, ONLY: zwx => wrk_2d_1 ! 2D workspace 93 !! 94 INTEGER, INTENT( in ) :: kt ! ocean time-step indexocean time step 95 !! 96 INTEGER :: ji, jj, jk ! dummy loop indices 97 REAL(wp) :: zcoef, zdku, zdkv, zri, z05alp ! temporary scalars 98 !!---------------------------------------------------------------------- 99 100 IF( wrk_in_use(2, 1) ) THEN 112 USE wrk_nemo, ONLY: zwx => wrk_2d_1 ! 2D workspace 113 USE wrk_nemo, ONLY: ekm_dep => wrk_2d_2 ! 2D workspace 114 USE phycst, ONLY: rsmall,rau0 115 USE sbc_oce, ONLY: taum 116 !! 117 INTEGER, INTENT( in ) :: kt ! ocean time-step 118 !! 119 INTEGER :: ji, jj, jk ! dummy loop indices 120 REAL(wp) :: zcoef, zdku, zdkv, zri, z05alp, zflageos ! temporary scalars 121 REAL(wp) :: zrhos, zustar 122 !!---------------------------------------------------------------------- 123 124 IF( wrk_in_use(2, 1,2) ) THEN 101 125 CALL ctl_stop('zdf_ric : requested workspace array unavailable') ; RETURN 102 126 ENDIF … … 145 169 ! ! =============== 146 170 ! 171 IF( ln_mldw ) THEN 172 173 ! Compute Ekman depth from wind stress forcing. 174 ! ------------------------------------------------------- 175 zflageos = ( 0.5 + SIGN( 0.5, nn_eos - 1. ) ) * rau0 176 DO jj = 1, jpj 177 DO ji = 1, jpi 178 zrhos = rhop(ji,jj,1) + zflageos * ( 1. - tmask(ji,jj,1) ) 179 zustar = SQRT( taum(ji,jj) / ( zrhos + rsmall ) ) 180 ekm_dep(ji,jj) = rn_ekmfc * zustar / ( ABS( ff(ji,jj) ) + rsmall ) 181 ekm_dep(ji,jj) = MAX(ekm_dep(ji,jj),rn_mldmin) ! Minimun allowed 182 ekm_dep(ji,jj) = MIN(ekm_dep(ji,jj),rn_mldmax) ! Maximum allowed 183 END DO 184 END DO 185 186 ! In the first model level vertical diff/visc coeff.s 187 ! are always equal to the namelist values rn_wtmix/rn_wvmix 188 ! ------------------------------------------------------- 189 DO jj = 1, jpj 190 DO ji = 1, jpi 191 avmv(ji,jj,1) = MAX( avmv(ji,jj,1), rn_wvmix ) 192 avmu(ji,jj,1) = MAX( avmu(ji,jj,1), rn_wvmix ) 193 avt( ji,jj,1) = MAX( avt(ji,jj,1), rn_wtmix ) 194 END DO 195 END DO 196 197 ! Force the vertical mixing coef within the Ekman depth 198 ! ------------------------------------------------------- 199 DO jk = 2, jpkm1 200 DO jj = 1, jpj 201 DO ji = 1, jpi 202 IF( fsdept(ji,jj,jk) < ekm_dep(ji,jj) ) THEN 203 avmv(ji,jj,jk) = MAX( avmv(ji,jj,jk), rn_wvmix ) 204 avmu(ji,jj,jk) = MAX( avmu(ji,jj,jk), rn_wvmix ) 205 avt( ji,jj,jk) = MAX( avt(ji,jj,jk), rn_wtmix ) 206 ENDIF 207 END DO 208 END DO 209 END DO 210 211 DO jk = 1, jpkm1 212 DO jj = 1, jpj 213 DO ji = 1, jpi 214 avmv(ji,jj,jk) = avmv(ji,jj,jk) * vmask(ji,jj,jk) 215 avmu(ji,jj,jk) = avmu(ji,jj,jk) * umask(ji,jj,jk) 216 avt( ji,jj,jk) = avt( ji,jj,jk) * tmask(ji,jj,jk) 217 END DO 218 END DO 219 END DO 220 221 ENDIF 222 147 223 CALL lbc_lnk( avt , 'W', 1. ) ! Boundary conditions (unchanged sign) 148 224 CALL lbc_lnk( avmu, 'U', 1. ) ; CALL lbc_lnk( avmv, 'V', 1. ) 149 225 ! 150 IF( wrk_not_released(2, 1 ) ) CALL ctl_stop('zdf_ric: failed to release workspace array')226 IF( wrk_not_released(2, 1,2) ) CALL ctl_stop('zdf_ric: failed to release workspace array') 151 227 ! 152 228 END SUBROUTINE zdf_ric … … 168 244 INTEGER :: ji, jj, jk ! dummy loop indices 169 245 !! 170 NAMELIST/namzdf_ric/ rn_avmri, rn_alp, nn_ric 246 NAMELIST/namzdf_ric/ rn_avmri, rn_alp , nn_ric , rn_ekmfc, & 247 & rn_mldmin, rn_mldmax, rn_wtmix, rn_wvmix, ln_mldw 171 248 !!---------------------------------------------------------------------- 172 249 ! … … 179 256 WRITE(numout,*) '~~~~~~~' 180 257 WRITE(numout,*) ' Namelist namzdf_ric : set Kz(Ri) parameters' 181 WRITE(numout,*) ' maximum vertical viscosity rn_avmri = ', rn_avmri 182 WRITE(numout,*) ' coefficient rn_alp = ', rn_alp 183 WRITE(numout,*) ' coefficient nn_ric = ', nn_ric 258 WRITE(numout,*) ' maximum vertical viscosity rn_avmri = ', rn_avmri 259 WRITE(numout,*) ' coefficient rn_alp = ', rn_alp 260 WRITE(numout,*) ' coefficient nn_ric = ', nn_ric 261 WRITE(numout,*) ' Ekman Factor Coeff rn_ekmfc = ', rn_ekmfc 262 WRITE(numout,*) ' minimum mixed layer depth rn_mldmin = ', rn_mldmin 263 WRITE(numout,*) ' maximum mixed layer depth rn_mldmax = ', rn_mldmax 264 WRITE(numout,*) ' Vertical eddy Diff. in the ML rn_wtmix = ', rn_wtmix 265 WRITE(numout,*) ' Vertical eddy Visc. in the ML rn_wvmix = ', rn_wvmix 266 WRITE(numout,*) ' Use the MLD parameterization ln_mldw = ', ln_mldw 184 267 ENDIF 185 268 ! -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r2977 r3104 57 57 USE sshwzv ! vertical velocity used in asm 58 58 USE diaptr ! poleward transports (dia_ptr_init routine) 59 USE diadct ! sections transports (dia_dct_init routine) 59 60 USE diaobs ! Observation diagnostics (dia_obs_init routine) 60 61 USE step ! NEMO time-stepping (stp routine) … … 341 342 #endif 342 343 ! ! Diagnostics 344 IF( lk_floats ) CALL flo_init ! drifting Floats 343 345 CALL iom_init ! iom_put initialization 344 IF( lk_floats ) CALL flo_init ! drifting Floats345 346 IF( lk_diaar5 ) CALL dia_ar5_init ! ar5 diag 346 347 CALL dia_ptr_init ! Poleward TRansports initialization 348 IF( lk_diadct ) CALL dia_dct_init ! Sections tranports 347 349 CALL dia_hsb_init ! heat content, salt content and volume budgets 348 350 CALL trd_mod_init ! Mixed-layer/Vorticity/Integral constraints trends … … 456 458 CALL iom_close ! close all input/output files managed by iom_* 457 459 ! 458 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 459 IF( numsol /= -1 ) CLOSE( numsol ) ! solver file 460 IF( numnam /= -1 ) CLOSE( numnam ) ! oce namelist 461 IF( numnam_ice /= -1 ) CLOSE( numnam_ice ) ! ice namelist 462 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 463 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 460 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 461 IF( numsol /= -1 ) CLOSE( numsol ) ! solver file 462 IF( numnam /= -1 ) CLOSE( numnam ) ! oce namelist 463 IF( numnam_ice /= -1 ) CLOSE( numnam_ice ) ! ice namelist 464 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 465 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 466 IF( numdct_vol /= -1 ) CLOSE( numdct_vol ) ! volume transports 467 IF( numdct_heat /= -1 ) CLOSE( numdct_heat ) ! heat transports 468 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 469 464 470 ! 465 471 numout = 6 ! redefine numout in case it is used after this point... -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/step.F90
r2977 r3104 96 96 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 97 97 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 98 IF( lk_tide ) CALL sbc_tide( kstp ) 98 99 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 99 100 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries … … 163 164 IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics 164 165 IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics 166 IF( lk_diadct ) CALL dia_dct( kstp ) ! Transports 165 167 IF( lk_diaar5 ) CALL dia_ar5( kstp ) ! ar5 diag 168 IF( lk_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis 166 169 CALL dia_wri( kstp ) ! ocean model: outputs 167 170 -
branches/2011/dev_LOCEAN_CMCC_INGV_MERCATOR_2011/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r2977 r3104 21 21 USE sbccpl ! surface boundary condition: coupled formulation (call send at end of step) 22 22 USE cpl_oasis3, ONLY : lk_cpl 23 USE sbctide ! Tide initialisation 23 24 24 25 USE traqsr ! solar radiation penetration (tra_qsr routine) … … 79 80 USE trdvor ! vorticity budget (trd_vor routine) 80 81 USE diaptr ! poleward transports (dia_ptr routine) 82 USE diadct ! sections transports (dia_dct routine) 81 83 USE diaar5 ! AR5 diagnosics (dia_ar5 routine) 82 84 USE diahth ! thermocline depth (dia_hth routine) 83 85 USE diafwb ! freshwater budget (dia_fwb routine) 84 86 USE diahsb ! heat, salt and volume budgets (dia_hsb routine) 87 USE diaharm 85 88 USE flo_oce ! floats variables 86 89 USE floats ! floats computation (flo_stp routine)
Note: See TracChangeset
for help on using the changeset viewer.