Changeset 13286
- Timestamp:
- 2020-07-09T17:48:29+02:00 (4 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 2 deleted
- 199 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 2 2 ^/utils/build/makenemo@HEAD makenemo 3 3 ^/utils/build/mk@HEAD mk 4 ^/utils/tools /@HEADtools4 ^/utils/tools@HEAD tools 5 5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM … … 8 8 9 9 # SETTE 10 ^/utils/CI/ sette@12931sette10 ^/utils/CI/r12931_sette_ticket2366@HEAD sette
-
- Property svn:externals
-
NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/AGRIF_FixedGrids.in
r9770 r13286 1 1 2 2 4 2 8249 91 1 1 13 12 2 153110 143 4 4 42 41 81 49 91 1 1 1 3 121 152 110 143 4 4 4 4 4 0 5 5 1 -
NEMO/trunk/cfgs/AGRIF_DEMO/EXPREF/namelist_cfg
r13208 r13286 33 33 / 34 34 !----------------------------------------------------------------------- 35 &namcfg ! parameters of the configuration (default: use r defined GYRE)35 &namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg) 36 36 !----------------------------------------------------------------------- 37 37 ln_read_cfg = .true. ! (=T) read the domain configuration file … … 42 42 / 43 43 !----------------------------------------------------------------------- 44 &namtsd ! Temperature & Salinity Data 44 &namtsd ! Temperature & Salinity Data (init/dmp) (default: OFF) 45 45 !----------------------------------------------------------------------- 46 46 ! ! =T read T-S fields for: … … 63 63 !! namsbc_cpl CouPLed formulation ("key_oasis3" ) 64 64 !! namsbc_sas Stand-Alone Surface module (SAS_SRC only) 65 !! namsbc_iif Ice-IF: use observed ice cover (nn_ice = 1 ) 65 66 !! namtra_qsr penetrative solar radiation (ln_traqsr =T) 67 !! namsbc_ssr sea surface restoring term (for T and/or S) (ln_ssr =T) 66 68 !! namsbc_rnf river runoffs (ln_rnf =T) 69 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T) 67 70 !! namsbc_isf ice shelf melting/freezing (ln_isfcav =T : read (ln_read_cfg=T) or set or usr_def_zgr ) 68 71 !! namsbc_iscpl coupling option between land ice model and ocean (ln_isfcav =T) 69 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T)70 !! namsbc_ssr sea surface restoring term (for T and/or S) (ln_ssr =T)71 72 !! namsbc_wave external fields from wave model (ln_wave =T) 72 73 !! namberg iceberg floats (ln_icebergs=T) … … 74 75 ! 75 76 !----------------------------------------------------------------------- 76 &namsbc ! Surface Boundary Condition (surface module)77 &namsbc ! Surface Boundary Condition manager (default: NO selection) 77 78 !----------------------------------------------------------------------- 78 79 nn_fsbc = 1 ! frequency of SBC module call … … 86 87 ! Misc. options of sbc : 87 88 ln_traqsr = .true. ! Light penetration in the ocean (T => fill namtra_qsr) 89 ln_ssr = .true. ! Sea Surface Restoring on T and/or S (T => fill namsbc_ssr) 88 90 ln_rnf = .true. ! runoffs (T => fill namsbc_rnf) 89 ln_ssr = .true. ! Sea Surface Restoring on T and/or S (T => fill namsbc_ssr)90 91 nn_fwb = 0 ! FreshWater Budget: =0 unchecked 91 92 / 92 93 !----------------------------------------------------------------------- 93 &namsbc_blk ! namsbc_blk generic Bulk formula(ln_blk =T)94 &namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T) 94 95 !----------------------------------------------------------------------- 95 96 ! ! bulk algorithm : 96 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 97 ! 97 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 98 98 cn_dir = './' ! root directory for the bulk data location 99 99 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! 100 100 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 101 101 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename ! 102 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bicubic_noc.nc' , 'Uwnd' , ''103 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bicubic_noc.nc' , 'Vwnd' , ''104 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''105 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''106 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''107 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''108 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''109 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''110 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''102 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Uwnd' , '' 103 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Vwnd' , '' 104 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 105 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 106 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 107 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 108 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 109 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 110 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 111 111 / 112 112 !----------------------------------------------------------------------- … … 125 125 / 126 126 !----------------------------------------------------------------------- 127 &namsbc_ssr ! surface boundary condition : sea surface restoring (ln_ssr =T) 128 !----------------------------------------------------------------------- 129 nn_sssr = 2 ! add a damping term to the surface freshwater flux 130 rn_deds = -166.67 ! magnitude of the damping on salinity [mm/day] 131 ln_sssr_bnd = .true. ! flag to bound erp term (associated with nn_sssr=2) 132 rn_sssr_bnd = 4.e0 ! ABS(Max/Min) value of the damping erp term [mm/day] 133 / 134 !----------------------------------------------------------------------- 127 135 &namsbc_rnf ! runoffs (ln_rnf =T) 128 136 !----------------------------------------------------------------------- … … 130 138 rn_hrnf = 15.e0 ! depth over which enhanced vertical mixing is used (ln_rnf_mouth=T) 131 139 rn_avt_rnf = 1.e-3 ! value of the additional vertical mixing coef. [m2/s] (ln_rnf_mouth=T) 140 rn_rfact = 1.e0 ! multiplicative factor for runoff 132 141 133 142 cn_dir = './' ! root directory for the location of the runoff files … … 142 151 / 143 152 !----------------------------------------------------------------------- 144 &namsbc_ssr ! surface boundary condition : sea surface restoring (ln_ssr =T) 145 !----------------------------------------------------------------------- 146 nn_sssr = 2 ! add a damping term to the surface freshwater flux 147 rn_deds = -166.67 ! magnitude of the damping on salinity [mm/day] 148 ln_sssr_bnd = .true. ! flag to bound erp term (associated with nn_sssr=2) 149 rn_sssr_bnd = 4.e0 ! ABS(Max/Min) value of the damping erp term [mm/day] 150 / 151 !----------------------------------------------------------------------- 152 &namberg ! iceberg parameters (default: No iceberg) 153 &namsbc_wave ! External fields from wave model (ln_wave=T) 154 !----------------------------------------------------------------------- 155 / 156 !----------------------------------------------------------------------- 157 &namberg ! iceberg parameters (default: OFF) 153 158 !----------------------------------------------------------------------- 154 159 ! iceberg floats are not currently available with AGRIF … … 159 164 !! !! 160 165 !! namlbc lateral momentum boundary condition (default: NO selection) 161 !! namagrif agrif nested grid ( read by child model only) ("key_agrif")166 !! namagrif agrif nested grid (read by child model only) ("key_agrif") 162 167 !! nam_tide Tidal forcing (default: OFF) 163 168 !! nambdy Unstructured open boundaries (default: OFF) … … 212 217 / 213 218 !!====================================================================== 214 !! Tracer (T & S) namelists!!219 !! Tracer (T-S) namelists !! 215 220 !! !! 216 221 !! nameos equation of state (default: NO selection) … … 233 238 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order 234 239 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order 235 /236 !-----------------------------------------------------------------------237 &namtra_mle ! mixed layer eddy parametrisation (Fox-Kemper) (default: OFF)238 !-----------------------------------------------------------------------239 ln_mle = .true. ! (T) use the Mixed Layer Eddy (MLE) parameterisation240 240 / 241 241 !----------------------------------------------------------------------- … … 255 255 / 256 256 !----------------------------------------------------------------------- 257 &namtra_eiv ! eddy induced velocity param. (default: OFF) 258 !----------------------------------------------------------------------- 259 ln_ldfeiv =.true. ! use eddy induced velocity parameterization 257 &namtra_mle ! mixed layer eddy parametrisation (Fox-Kemper) (default: OFF) 258 !----------------------------------------------------------------------- 259 ln_mle = .true. ! (T) use the Mixed Layer Eddy (MLE) parameterisation 260 / 261 !----------------------------------------------------------------------- 262 &namtra_eiv ! eddy induced velocity param. (default: OFF) 263 !----------------------------------------------------------------------- 264 ln_ldfeiv = .true. ! use eddy induced velocity parameterization 260 265 ! ! Coefficients: 261 266 nn_aei_ijk_t = 21 ! space/time variation of the eiv coeficient … … 286 291 ! 287 292 !----------------------------------------------------------------------- 288 &nam_vvl ! vertical coordinate options (default: z-star)289 !-----------------------------------------------------------------------290 /291 !-----------------------------------------------------------------------292 293 &namdyn_adv ! formulation of the momentum advection (default: NO selection) 293 294 !----------------------------------------------------------------------- … … 334 335 ! 335 336 !----------------------------------------------------------------------- 336 &namzdf ! vertical physics 337 &namzdf ! vertical physics manager (default: NO selection) 337 338 !----------------------------------------------------------------------- 338 339 ! ! type of vertical closure … … 384 385 !!====================================================================== 385 386 ! 386 !387 387 !----------------------------------------------------------------------- 388 388 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") -
NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg
r13214 r13286 110 110 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 111 111 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename ! 112 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bicubic_noc.nc' , 'Uwnd' , ''113 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bicubic_noc.nc' , 'Vwnd' , ''114 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''115 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''116 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''117 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''118 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''119 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''120 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core _orca2_bilinear_noc.nc' , '' , ''112 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Uwnd' , '' 113 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Vwnd' , '' 114 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 115 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 116 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 117 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 118 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 119 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 120 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 121 121 / 122 122 !----------------------------------------------------------------------- … … 391 391 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 392 392 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename ! 393 sn_mpb = ' mixing_power_bot' , -12 , 'field' , .false. , .true. , 'yearly' , '' , '' , ''394 sn_mpp = ' mixing_power_pyc' , -12 , 'field' , .false. , .true. , 'yearly' , '' , '' , ''395 sn_mpc = ' mixing_power_cri' , -12 , 'field' , .false. , .true. , 'yearly' , '' , '' , ''396 sn_dsb = ' decay_scale_bot' , -12 , 'field', .false. , .true. , 'yearly' , '' , '' , ''397 sn_dsc = ' decay_scale_cri' , -12 , 'field', .false. , .true. , 'yearly' , '' , '' , ''393 sn_mpb = 'int_wave_mix' , -12. , 'mixing_power_bot' , .false. , .true. , 'yearly' , '' , '' , '' 394 sn_mpp = 'int_wave_mix' , -12. , 'mixing_power_pyc' , .false. , .true. , 'yearly' , '' , '' , '' 395 sn_mpc = 'int_wave_mix' , -12. , 'mixing_power_cri' , .false. , .true. , 'yearly' , '' , '' , '' 396 sn_dsb = 'int_wave_mix' , -12. , 'decay_scale_bot' , .false. , .true. , 'yearly' , '' , '' , '' 397 sn_dsc = 'int_wave_mix' , -12. , 'decay_scale_cri' , .false. , .true. , 'yearly' , '' , '' , '' 398 398 / 399 399 !!====================================================================== -
NEMO/trunk/cfgs/ORCA2_SAS_ICE/EXPREF/namelist_cfg
r13208 r13286 73 73 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 74 74 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename ! 75 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bicubic_noc.nc' , 'Uwnd' , '' 76 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bicubic_noc.nc' , 'Vwnd' , '' 77 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 78 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 79 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 80 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 81 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 82 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 83 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 84 / 85 !----------------------------------------------------------------------- 86 &namsbc_cpl ! coupled ocean/atmosphere model ("key_oasis3") 87 !----------------------------------------------------------------------- 75 sn_wndi = 'u_10.15JUNE2009_fill' , 6. , 'U_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Uwnd' , '' 76 sn_wndj = 'v_10.15JUNE2009_fill' , 6. , 'V_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bicub' , 'Vwnd' , '' 77 sn_qsr = 'ncar_rad.15JUNE2009_fill' , 24. , 'SWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 78 sn_qlw = 'ncar_rad.15JUNE2009_fill' , 24. , 'LWDN_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 79 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 80 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 81 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 82 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 83 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core2_orca2_bilin' , '' , '' 88 84 / 89 85 !----------------------------------------------------------------------- -
NEMO/trunk/cfgs/SHARED/namelist_ref
r13216 r13286 1209 1209 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask ! 1210 1210 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename ! 1211 sn_mpb = 'NOT USED' , -12 1212 sn_mpp = 'NOT USED' , -12 1213 sn_mpc = 'NOT USED' , -12 1214 sn_dsb = 'NOT USED' , -12 1215 sn_dsc = 'NOT USED' , -12 1211 sn_mpb = 'NOT USED' , -12. , 'mixing_power_bot' , .false. , .true. , 'yearly' , '' , '' , '' 1212 sn_mpp = 'NOT USED' , -12. , 'mixing_power_pyc' , .false. , .true. , 'yearly' , '' , '' , '' 1213 sn_mpc = 'NOT USED' , -12. , 'mixing_power_cri' , .false. , .true. , 'yearly' , '' , '' , '' 1214 sn_dsb = 'NOT USED' , -12. , 'decay_scale_bot' , .false. , .true. , 'yearly' , '' , '' , '' 1215 sn_dsc = 'NOT USED' , -12. , 'decay_scale_cri' , .false. , .true. , 'yearly' , '' , '' , '' 1216 1216 / 1217 1217 !!====================================================================== … … 1402 1402 jpni = 0 ! number of processors following i (set automatically if < 1), see also ln_listonly = T 1403 1403 jpnj = 0 ! number of processors following j (set automatically if < 1), see also ln_listonly = T 1404 nn_hls = 1 ! halo width (applies to both rows and columns) 1404 1405 / 1405 1406 !----------------------------------------------------------------------- … … 1417 1418 sn_cfctl%procincr = 1 ! Increment for optional subsetting of areas [default:1] 1418 1419 sn_cfctl%ptimincr = 1 ! Timestep increment for writing time step progress info 1419 nn_print = 0 ! level of print (0 no extra print)1420 1420 nn_ictls = 0 ! start i indice of control sum (use to compare mono versus 1421 1421 nn_ictle = 0 ! end i indice of control sum multi processor runs -
NEMO/trunk/cfgs/ref_cfgs.txt
r13227 r13286 11 11 SPITZ12 OCE ICE 12 12 WED025 OCE ICE 13 -
NEMO/trunk/src/ABL/ablrst.F90
r13214 r13286 165 165 166 166 ! --- mandatory fields --- ! 167 CALL iom_get( numrar, jpdom_auto glo, 'u_abl', u_abl(:,:,:,nt_n ))168 CALL iom_get( numrar, jpdom_auto glo, 'v_abl', v_abl(:,:,:,nt_n ))169 CALL iom_get( numrar, jpdom_auto glo, 't_abl', tq_abl(:,:,:,nt_n,jp_ta) )170 CALL iom_get( numrar, jpdom_auto glo, 'q_abl', tq_abl(:,:,:,nt_n,jp_qa) )171 CALL iom_get( numrar, jpdom_auto glo, 'tke_abl', tke_abl(:,:,:,nt_n ) )172 CALL iom_get( numrar, jpdom_auto glo, 'avm_abl', avm_abl(:,:,: ) )173 CALL iom_get( numrar, jpdom_auto glo, 'avt_abl', avt_abl(:,:,: ) )174 CALL iom_get( numrar, jpdom_auto glo,'mxld_abl',mxld_abl(:,:,: ) )175 CALL iom_get( numrar, jpdom_auto glo, 'pblh', pblh(:,: ) )167 CALL iom_get( numrar, jpdom_auto, 'u_abl', u_abl(:,:,:,nt_n ), cd_type = 'U', psgn = -1._wp ) 168 CALL iom_get( numrar, jpdom_auto, 'v_abl', v_abl(:,:,:,nt_n ), cd_type = 'V', psgn = -1._wp ) 169 CALL iom_get( numrar, jpdom_auto, 't_abl', tq_abl(:,:,:,nt_n,jp_ta) ) 170 CALL iom_get( numrar, jpdom_auto, 'q_abl', tq_abl(:,:,:,nt_n,jp_qa) ) 171 CALL iom_get( numrar, jpdom_auto, 'tke_abl', tke_abl(:,:,:,nt_n ) ) 172 CALL iom_get( numrar, jpdom_auto, 'avm_abl', avm_abl(:,:,: ) ) 173 CALL iom_get( numrar, jpdom_auto, 'avt_abl', avt_abl(:,:,: ) ) 174 CALL iom_get( numrar, jpdom_auto,'mxld_abl',mxld_abl(:,:,: ) ) 175 CALL iom_get( numrar, jpdom_auto, 'pblh', pblh(:,: ) ) 176 176 CALL iom_delay_rst( 'READ', 'ABL', numrar ) ! read only abl delayed global communication variables 177 177 -
NEMO/trunk/src/ICE/icectl.F90
r12649 r13286 702 702 DO jl = 1, jpl 703 703 CALL prt_ctl_info(' ') 704 CALL prt_ctl_info(' - Category : ', ivar 1=jl)704 CALL prt_ctl_info(' - Category : ', ivar=jl) 705 705 CALL prt_ctl_info(' ~~~~~~~~~~') 706 706 CALL prt_ctl(tab2d_1=h_i (:,:,jl) , clinfo1= ' h_i : ') … … 719 719 720 720 DO jk = 1, nlay_i 721 CALL prt_ctl_info(' - Layer : ', ivar 1=jk)721 CALL prt_ctl_info(' - Layer : ', ivar=jk) 722 722 CALL prt_ctl(tab2d_1=t_i(:,:,jk,jl) , clinfo1= ' t_i : ') 723 723 END DO -
NEMO/trunk/src/ICE/icedia.F90
r12489 r13286 230 230 CALL iom_get( numrir, 'frc_tembot' , frc_tembot ) 231 231 CALL iom_get( numrir, 'frc_sal' , frc_sal ) 232 CALL iom_get( numrir, jpdom_auto glo, 'vol_loc_ini', vol_loc_ini )233 CALL iom_get( numrir, jpdom_auto glo, 'tem_loc_ini', tem_loc_ini )234 CALL iom_get( numrir, jpdom_auto glo, 'sal_loc_ini', sal_loc_ini )232 CALL iom_get( numrir, jpdom_auto, 'vol_loc_ini', vol_loc_ini ) 233 CALL iom_get( numrir, jpdom_auto, 'tem_loc_ini', tem_loc_ini ) 234 CALL iom_get( numrir, jpdom_auto, 'sal_loc_ini', sal_loc_ini ) 235 235 ELSE 236 236 IF(lwp) WRITE(numout,*) -
NEMO/trunk/src/ICE/icedyn_adv_pra.F90
r13226 r13286 772 772 ! 773 773 ! ! ice thickness 774 CALL iom_get( numrir, jpdom_auto glo, 'sxice' , sxice )775 CALL iom_get( numrir, jpdom_auto glo, 'syice' , syice )776 CALL iom_get( numrir, jpdom_auto glo, 'sxxice', sxxice )777 CALL iom_get( numrir, jpdom_auto glo, 'syyice', syyice )778 CALL iom_get( numrir, jpdom_auto glo, 'sxyice', sxyice )774 CALL iom_get( numrir, jpdom_auto, 'sxice' , sxice ) 775 CALL iom_get( numrir, jpdom_auto, 'syice' , syice ) 776 CALL iom_get( numrir, jpdom_auto, 'sxxice', sxxice ) 777 CALL iom_get( numrir, jpdom_auto, 'syyice', syyice ) 778 CALL iom_get( numrir, jpdom_auto, 'sxyice', sxyice ) 779 779 ! ! snow thickness 780 CALL iom_get( numrir, jpdom_auto glo, 'sxsn' , sxsn )781 CALL iom_get( numrir, jpdom_auto glo, 'sysn' , sysn )782 CALL iom_get( numrir, jpdom_auto glo, 'sxxsn' , sxxsn )783 CALL iom_get( numrir, jpdom_auto glo, 'syysn' , syysn )784 CALL iom_get( numrir, jpdom_auto glo, 'sxysn' , sxysn )780 CALL iom_get( numrir, jpdom_auto, 'sxsn' , sxsn ) 781 CALL iom_get( numrir, jpdom_auto, 'sysn' , sysn ) 782 CALL iom_get( numrir, jpdom_auto, 'sxxsn' , sxxsn ) 783 CALL iom_get( numrir, jpdom_auto, 'syysn' , syysn ) 784 CALL iom_get( numrir, jpdom_auto, 'sxysn' , sxysn ) 785 785 ! ! ice concentration 786 CALL iom_get( numrir, jpdom_auto glo, 'sxa' , sxa )787 CALL iom_get( numrir, jpdom_auto glo, 'sya' , sya )788 CALL iom_get( numrir, jpdom_auto glo, 'sxxa' , sxxa )789 CALL iom_get( numrir, jpdom_auto glo, 'syya' , syya )790 CALL iom_get( numrir, jpdom_auto glo, 'sxya' , sxya )786 CALL iom_get( numrir, jpdom_auto, 'sxa' , sxa ) 787 CALL iom_get( numrir, jpdom_auto, 'sya' , sya ) 788 CALL iom_get( numrir, jpdom_auto, 'sxxa' , sxxa ) 789 CALL iom_get( numrir, jpdom_auto, 'syya' , syya ) 790 CALL iom_get( numrir, jpdom_auto, 'sxya' , sxya ) 791 791 ! ! ice salinity 792 CALL iom_get( numrir, jpdom_auto glo, 'sxsal' , sxsal )793 CALL iom_get( numrir, jpdom_auto glo, 'sysal' , sysal )794 CALL iom_get( numrir, jpdom_auto glo, 'sxxsal', sxxsal )795 CALL iom_get( numrir, jpdom_auto glo, 'syysal', syysal )796 CALL iom_get( numrir, jpdom_auto glo, 'sxysal', sxysal )792 CALL iom_get( numrir, jpdom_auto, 'sxsal' , sxsal ) 793 CALL iom_get( numrir, jpdom_auto, 'sysal' , sysal ) 794 CALL iom_get( numrir, jpdom_auto, 'sxxsal', sxxsal ) 795 CALL iom_get( numrir, jpdom_auto, 'syysal', syysal ) 796 CALL iom_get( numrir, jpdom_auto, 'sxysal', sxysal ) 797 797 ! ! ice age 798 CALL iom_get( numrir, jpdom_auto glo, 'sxage' , sxage )799 CALL iom_get( numrir, jpdom_auto glo, 'syage' , syage )800 CALL iom_get( numrir, jpdom_auto glo, 'sxxage', sxxage )801 CALL iom_get( numrir, jpdom_auto glo, 'syyage', syyage )802 CALL iom_get( numrir, jpdom_auto glo, 'sxyage', sxyage )798 CALL iom_get( numrir, jpdom_auto, 'sxage' , sxage ) 799 CALL iom_get( numrir, jpdom_auto, 'syage' , syage ) 800 CALL iom_get( numrir, jpdom_auto, 'sxxage', sxxage ) 801 CALL iom_get( numrir, jpdom_auto, 'syyage', syyage ) 802 CALL iom_get( numrir, jpdom_auto, 'sxyage', sxyage ) 803 803 ! ! snow layers heat content 804 804 DO jk = 1, nlay_s 805 805 WRITE(zchar1,'(I2.2)') jk 806 znam = 'sxc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxc0 (:,:,jk,:) = z3d(:,:,:)807 znam = 'syc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; syc0 (:,:,jk,:) = z3d(:,:,:)808 znam = 'sxxc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxxc0(:,:,jk,:) = z3d(:,:,:)809 znam = 'syyc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; syyc0(:,:,jk,:) = z3d(:,:,:)810 znam = 'sxyc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxyc0(:,:,jk,:) = z3d(:,:,:)806 znam = 'sxc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxc0 (:,:,jk,:) = z3d(:,:,:) 807 znam = 'syc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; syc0 (:,:,jk,:) = z3d(:,:,:) 808 znam = 'sxxc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxxc0(:,:,jk,:) = z3d(:,:,:) 809 znam = 'syyc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; syyc0(:,:,jk,:) = z3d(:,:,:) 810 znam = 'sxyc0'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxyc0(:,:,jk,:) = z3d(:,:,:) 811 811 END DO 812 812 ! ! ice layers heat content 813 813 DO jk = 1, nlay_i 814 814 WRITE(zchar1,'(I2.2)') jk 815 znam = 'sxe'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxe (:,:,jk,:) = z3d(:,:,:)816 znam = 'sye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sye (:,:,jk,:) = z3d(:,:,:)817 znam = 'sxxe'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxxe(:,:,jk,:) = z3d(:,:,:)818 znam = 'syye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; syye(:,:,jk,:) = z3d(:,:,:)819 znam = 'sxye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto glo, znam , z3d ) ; sxye(:,:,jk,:) = z3d(:,:,:)815 znam = 'sxe'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxe (:,:,jk,:) = z3d(:,:,:) 816 znam = 'sye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sye (:,:,jk,:) = z3d(:,:,:) 817 znam = 'sxxe'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxxe(:,:,jk,:) = z3d(:,:,:) 818 znam = 'syye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; syye(:,:,jk,:) = z3d(:,:,:) 819 znam = 'sxye'//'_l'//zchar1 ; CALL iom_get( numrir, jpdom_auto, znam , z3d ) ; sxye(:,:,jk,:) = z3d(:,:,:) 820 820 END DO 821 821 ! 822 822 IF( ln_pnd_H12 ) THEN ! melt pond fraction 823 CALL iom_get( numrir, jpdom_auto glo, 'sxap' , sxap )824 CALL iom_get( numrir, jpdom_auto glo, 'syap' , syap )825 CALL iom_get( numrir, jpdom_auto glo, 'sxxap', sxxap )826 CALL iom_get( numrir, jpdom_auto glo, 'syyap', syyap )827 CALL iom_get( numrir, jpdom_auto glo, 'sxyap', sxyap )823 CALL iom_get( numrir, jpdom_auto, 'sxap' , sxap ) 824 CALL iom_get( numrir, jpdom_auto, 'syap' , syap ) 825 CALL iom_get( numrir, jpdom_auto, 'sxxap', sxxap ) 826 CALL iom_get( numrir, jpdom_auto, 'syyap', syyap ) 827 CALL iom_get( numrir, jpdom_auto, 'sxyap', sxyap ) 828 828 ! ! melt pond volume 829 CALL iom_get( numrir, jpdom_auto glo, 'sxvp' , sxvp )830 CALL iom_get( numrir, jpdom_auto glo, 'syvp' , syvp )831 CALL iom_get( numrir, jpdom_auto glo, 'sxxvp', sxxvp )832 CALL iom_get( numrir, jpdom_auto glo, 'syyvp', syyvp )833 CALL iom_get( numrir, jpdom_auto glo, 'sxyvp', sxyvp )829 CALL iom_get( numrir, jpdom_auto, 'sxvp' , sxvp ) 830 CALL iom_get( numrir, jpdom_auto, 'syvp' , syvp ) 831 CALL iom_get( numrir, jpdom_auto, 'sxxvp', sxxvp ) 832 CALL iom_get( numrir, jpdom_auto, 'syyvp', syyvp ) 833 CALL iom_get( numrir, jpdom_auto, 'sxyvp', sxyvp ) 834 834 ENDIF 835 835 ! -
NEMO/trunk/src/ICE/icedyn_rhg_evp.F90
r13237 r13286 845 845 ! 846 846 IF( MIN( id1, id2, id3 ) > 0 ) THEN ! fields exist 847 CALL iom_get( numrir, jpdom_auto glo, 'stress1_i' , stress1_i)848 CALL iom_get( numrir, jpdom_auto glo, 'stress2_i' , stress2_i)849 CALL iom_get( numrir, jpdom_auto glo, 'stress12_i', stress12_i)847 CALL iom_get( numrir, jpdom_auto, 'stress1_i' , stress1_i , cd_type = 'T' ) 848 CALL iom_get( numrir, jpdom_auto, 'stress2_i' , stress2_i , cd_type = 'T' ) 849 CALL iom_get( numrir, jpdom_auto, 'stress12_i', stress12_i, cd_type = 'F' ) 850 850 ELSE ! start rheology from rest 851 851 IF(lwp) WRITE(numout,*) -
NEMO/trunk/src/ICE/icerst.F90
r12649 r13286 211 211 212 212 ! --- mandatory fields --- ! 213 CALL iom_get( numrir, jpdom_auto glo, 'v_i' , v_i )214 CALL iom_get( numrir, jpdom_auto glo, 'v_s' , v_s )215 CALL iom_get( numrir, jpdom_auto glo, 'sv_i' , sv_i )216 CALL iom_get( numrir, jpdom_auto glo, 'a_i' , a_i )217 CALL iom_get( numrir, jpdom_auto glo, 't_su' , t_su )218 CALL iom_get( numrir, jpdom_auto glo, 'u_ice', u_ice)219 CALL iom_get( numrir, jpdom_auto glo, 'v_ice', v_ice)213 CALL iom_get( numrir, jpdom_auto, 'v_i' , v_i ) 214 CALL iom_get( numrir, jpdom_auto, 'v_s' , v_s ) 215 CALL iom_get( numrir, jpdom_auto, 'sv_i' , sv_i ) 216 CALL iom_get( numrir, jpdom_auto, 'a_i' , a_i ) 217 CALL iom_get( numrir, jpdom_auto, 't_su' , t_su ) 218 CALL iom_get( numrir, jpdom_auto, 'u_ice', u_ice, cd_type = 'U', psgn = -1._wp ) 219 CALL iom_get( numrir, jpdom_auto, 'v_ice', v_ice, cd_type = 'V', psgn = -1._wp ) 220 220 ! Snow enthalpy 221 221 DO jk = 1, nlay_s 222 222 WRITE(zchar1,'(I2.2)') jk 223 223 znam = 'e_s'//'_l'//zchar1 224 CALL iom_get( numrir, jpdom_auto glo, znam , z3d )224 CALL iom_get( numrir, jpdom_auto, znam , z3d ) 225 225 e_s(:,:,jk,:) = z3d(:,:,:) 226 226 END DO … … 229 229 WRITE(zchar1,'(I2.2)') jk 230 230 znam = 'e_i'//'_l'//zchar1 231 CALL iom_get( numrir, jpdom_auto glo, znam , z3d )231 CALL iom_get( numrir, jpdom_auto, znam , z3d ) 232 232 e_i(:,:,jk,:) = z3d(:,:,:) 233 233 END DO … … 236 236 id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 237 237 IF( id1 > 0 ) THEN ! fields exist 238 CALL iom_get( numrir, jpdom_auto glo, 'oa_i', oa_i )238 CALL iom_get( numrir, jpdom_auto, 'oa_i', oa_i ) 239 239 ELSE ! start from rest 240 240 IF(lwp) WRITE(numout,*) ' ==>> previous run without ice age output then set it to zero' … … 244 244 id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 245 245 IF( id2 > 0 ) THEN ! fields exist 246 CALL iom_get( numrir, jpdom_auto glo, 'a_ip' , a_ip )247 CALL iom_get( numrir, jpdom_auto glo, 'v_ip' , v_ip )246 CALL iom_get( numrir, jpdom_auto, 'a_ip' , a_ip ) 247 CALL iom_get( numrir, jpdom_auto, 'v_ip' , v_ip ) 248 248 ELSE ! start from rest 249 249 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' … … 256 256 id4 = iom_varid( numrir, 't1_ice' , ldstop = .FALSE. ) 257 257 IF( id3 > 0 .AND. id4 > 0 ) THEN ! fields exist 258 CALL iom_get( numrir, jpdom_auto glo, 'cnd_ice', cnd_ice )259 CALL iom_get( numrir, jpdom_auto glo, 't1_ice' , t1_ice )258 CALL iom_get( numrir, jpdom_auto, 'cnd_ice', cnd_ice ) 259 CALL iom_get( numrir, jpdom_auto, 't1_ice' , t1_ice ) 260 260 ELSE ! start from rest 261 261 IF(lwp) WRITE(numout,*) ' ==>> previous run without conductivity output then set it to zero' -
NEMO/trunk/src/ICE/iceupdate.F90
r13226 r13286 417 417 ! 418 418 IF( id1 > 0 ) THEN ! fields exist 419 CALL iom_get( numrir, jpdom_auto glo, 'snwice_mass' , snwice_mass )420 CALL iom_get( numrir, jpdom_auto glo, 'snwice_mass_b', snwice_mass_b )419 CALL iom_get( numrir, jpdom_auto, 'snwice_mass' , snwice_mass ) 420 CALL iom_get( numrir, jpdom_auto, 'snwice_mass_b', snwice_mass_b ) 421 421 ELSE ! start from rest 422 422 IF(lwp) WRITE(numout,*) ' ==>> previous run without snow-ice mass output then set it' -
NEMO/trunk/src/NST/agrif_ice_interp.F90
r13216 r13286 269 269 ! imin = i1 ; imax = i2 ; jmin = j1 ; jmax = j2 270 270 ! IF( (nbondj == -1) .OR. (nbondj == 2) ) jmin = 3 271 ! IF( (nbondj == +1) .OR. (nbondj == 2) ) jmax = nlcj-2271 ! IF( (nbondj == +1) .OR. (nbondj == 2) ) jmax = jpj-2 272 272 ! IF( (nbondi == -1) .OR. (nbondi == 2) ) imin = 3 273 ! IF( (nbondi == +1) .OR. (nbondi == 2) ) imax = nlci-2273 ! IF( (nbondi == +1) .OR. (nbondi == 2) ) imax = jpi-2 274 274 ! 275 275 ! ! smoothed fields 276 276 ! IF( eastern_side ) THEN 277 ! ztab( nlci,j1:j2,:) = z1 * ptab(nlci,j1:j2,:) + z2 * ptab(nlci-1,j1:j2,:)277 ! ztab(jpi,j1:j2,:) = z1 * ptab(jpi,j1:j2,:) + z2 * ptab(jpi-1,j1:j2,:) 278 278 ! DO jj = jmin, jmax 279 279 ! rswitch = 0. 280 ! IF( u_ice( nlci-2,jj) > 0._wp ) rswitch = 1.281 ! ztab( nlci-1,jj,:) = ( 1. - umask(nlci-2,jj,1) ) * ztab(nlci,jj,:) &282 ! & + umask(nlci-2,jj,1) * &283 ! & ( ( 1. - rswitch ) * ( z4 * ztab(nlci,jj,:) + z3 * ztab(nlci-2,jj,:) ) &284 ! & + rswitch * ( z6 * ztab(nlci-2,jj,:) + z5 * ztab(nlci,jj,:) + z7 * ztab(nlci-3,jj,:) ) )285 ! ztab( nlci-1,jj,:) = ztab(nlci-1,jj,:) * tmask(nlci-1,jj,1)280 ! IF( u_ice(jpi-2,jj) > 0._wp ) rswitch = 1. 281 ! ztab(jpi-1,jj,:) = ( 1. - umask(jpi-2,jj,1) ) * ztab(jpi,jj,:) & 282 ! & + umask(jpi-2,jj,1) * & 283 ! & ( (1. - rswitch) * ( z4 * ztab(jpi ,jj,:) + z3 * ztab(jpi-2,jj,:) ) & 284 ! & + rswitch * ( z6 * ztab(jpi-2,jj,:) + z5 * ztab(jpi ,jj,:) + z7 * ztab(jpi-3,jj,:) ) ) 285 ! ztab(jpi-1,jj,:) = ztab(jpi-1,jj,:) * tmask(jpi-1,jj,1) 286 286 ! END DO 287 287 ! ENDIF 288 288 ! ! 289 289 ! IF( northern_side ) THEN 290 ! ztab(i1:i2, nlcj,:) = z1 * ptab(i1:i2,nlcj,:) + z2 * ptab(i1:i2,nlcj-1,:)290 ! ztab(i1:i2,jpj,:) = z1 * ptab(i1:i2,jpj,:) + z2 * ptab(i1:i2,jpj-1,:) 291 291 ! DO ji = imin, imax 292 292 ! rswitch = 0. 293 ! IF( v_ice(ji, nlcj-2) > 0._wp ) rswitch = 1.294 ! ztab(ji, nlcj-1,:) = ( 1. - vmask(ji,nlcj-2,1) ) * ztab(ji,nlcj,:) &295 ! & + vmask(ji,nlcj-2,1) * &296 ! & ( ( 1. - rswitch ) * ( z4 * ztab(ji,nlcj,:) + z3 * ztab(ji,nlcj-2,:) ) &297 ! & + rswitch * ( z6 * ztab(ji,nlcj-2,:) + z5 * ztab(ji,nlcj,:) + z7 * ztab(ji,nlcj-3,:) ) )298 ! ztab(ji, nlcj-1,:) = ztab(ji,nlcj-1,:) * tmask(ji,nlcj-1,1)293 ! IF( v_ice(ji,jpj-2) > 0._wp ) rswitch = 1. 294 ! ztab(ji,jpj-1,:) = ( 1. - vmask(ji,jpj-2,1) ) * ztab(ji,jpj,:) & 295 ! & + vmask(ji,jpj-2,1) * & 296 ! & ( (1. - rswitch) * ( z4 * ztab(ji,jpj ,:) + z3 * ztab(ji,jpj-2,:) ) & 297 ! & + rswitch * ( z6 * ztab(ji,jpj-2,:) + z5 * ztab(ji,jpj ,:) + z7 * ztab(ji,jpj-3,:) ) ) 298 ! ztab(ji,jpj-1,:) = ztab(ji,jpj-1,:) * tmask(ji,jpj-1,1) 299 299 ! END DO 300 300 ! END IF … … 327 327 ! ! 328 328 ! ! Treatment of corners 329 ! IF( (eastern_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( nlci-1,2,:) = ptab(nlci-1,2,:)! East south330 ! IF( (eastern_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( nlci-1,nlcj-1,:) = ptab(nlci-1,nlcj-1,:)! East north331 ! IF( (western_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( 2,2,:) = ptab(2,2,:)! West south332 ! IF( (western_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( 2,nlcj-1,:) = ptab(2,nlcj-1,:)! West north329 ! IF( (eastern_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab(jpi-1,2 ,:) = ptab(jpi-1, 2,:) ! East south 330 ! IF( (eastern_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab(jpi-1,jpj-1,:) = ptab(jpi-1,jpj-1,:) ! East north 331 ! IF( (western_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( 2, 2,:) = ptab( 2, 2,:) ! West south 332 ! IF( (western_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( 2,jpj-1,:) = ptab( 2,jpj-1,:) ! West north 333 333 ! 334 334 ! ! retrieve ice tracers -
NEMO/trunk/src/NST/agrif_oce.F90
r13216 r13286 68 68 INTEGER, PUBLIC :: avt_id, avm_id, en_id ! TKE related identificators 69 69 INTEGER, PUBLIC :: mbkt_id, ht0_id 70 INTEGER, PUBLIC :: glamt_id, gphit_id 70 71 INTEGER, PUBLIC :: kindic_agr 71 72 -
NEMO/trunk/src/NST/agrif_oce_interp.F90
r13216 r13286 44 44 PUBLIC interptsn, interpsshn, interpavm 45 45 PUBLIC interpunb, interpvnb , interpub2b, interpvb2b 46 PUBLIC interpe3t 46 PUBLIC interpe3t, interpglamt, interpgphit 47 47 PUBLIC interpht0, interpmbkt 48 48 PUBLIC agrif_initts, agrif_initssh … … 87 87 IF( Agrif_Root() ) RETURN 88 88 ! 89 Agrif_SpecialValue = 0. _wp89 Agrif_SpecialValue = 0.0_wp 90 90 Agrif_UseSpecialValue = ln_spc_dyn 91 91 ! 92 92 use_sign_north = .TRUE. 93 sign_north = -1. 93 sign_north = -1.0_wp 94 94 CALL Agrif_Bc_variable( un_interp_id, procname=interpun ) 95 95 CALL Agrif_Bc_variable( vn_interp_id, procname=interpvn ) … … 100 100 ! --- West --- ! 101 101 IF( lk_west ) THEN 102 ibdy1 = 2103 ibdy2 = 1+nbghostcells102 ibdy1 = nn_hls + 2 ! halo + land + 1 103 ibdy2 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 104 104 ! 105 105 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport 106 106 DO ji = mi0(ibdy1), mi1(ibdy2) 107 107 uu_b(ji,:,Krhs_a) = 0._wp 108 109 108 DO jk = 1, jpkm1 110 109 DO jj = 1, jpj … … 112 111 END DO 113 112 END DO 114 115 113 DO jj = 1, jpj 116 114 uu_b(ji,jj,Krhs_a) = uu_b(ji,jj,Krhs_a) * r1_hu(ji,jj,Krhs_a) … … 123 121 DO jk = 1, jpkm1 124 122 DO jj = 1, jpj 125 zub(ji,jj) = zub(ji,jj) & 126 & + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a)*umask(ji,jj,jk) 123 zub(ji,jj) = zub(ji,jj) + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 127 124 END DO 128 125 END DO 129 126 DO jj=1,jpj 130 127 zub(ji,jj) = zub(ji,jj) * r1_hu(ji,jj,Krhs_a) 131 END DO 132 128 END DO 133 129 DO jk = 1, jpkm1 134 130 DO jj = 1, jpj 135 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) + uu_b(ji,jj,Krhs_a) -zub(ji,jj)) * umask(ji,jj,jk)136 END DO 137 END DO 138 END DO 139 131 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 132 END DO 133 END DO 134 END DO 135 ! 140 136 IF( ln_dynspg_ts ) THEN ! Set tangential velocities to time splitting estimate 141 137 DO ji = mi0(ibdy1), mi1(ibdy2) … … 151 147 DO jk = 1, jpkm1 152 148 DO jj = 1, jpj 153 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) + vv_b(ji,jj,Krhs_a) -zvb(ji,jj))*vmask(ji,jj,jk)149 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) )*vmask(ji,jj,jk) 154 150 END DO 155 151 END DO 156 152 END DO 157 153 ENDIF 154 ! 158 155 ENDIF 159 156 160 157 ! --- East --- ! 161 158 IF( lk_east) THEN 162 ibdy1 = jpiglo -1-nbghostcells163 ibdy2 = jpiglo -2159 ibdy1 = jpiglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 160 ibdy2 = jpiglo - ( nn_hls + 2 ) ! halo + land + 1 164 161 ! 165 162 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport … … 168 165 DO jk = 1, jpkm1 169 166 DO jj = 1, jpj 170 uu_b(ji,jj,Krhs_a) = uu_b(ji,jj,Krhs_a) & 171 & + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 167 uu_b(ji,jj,Krhs_a) = uu_b(ji,jj,Krhs_a) + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 172 168 END DO 173 169 END DO … … 182 178 DO jk = 1, jpkm1 183 179 DO jj = 1, jpj 184 zub(ji,jj) = zub(ji,jj) & 185 & + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 180 zub(ji,jj) = zub(ji,jj) + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 186 181 END DO 187 182 END DO … … 189 184 zub(ji,jj) = zub(ji,jj) * r1_hu(ji,jj,Krhs_a) 190 185 END DO 191 192 186 DO jk = 1, jpkm1 193 187 DO jj = 1, jpj 194 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) & 195 & + uu_b(ji,jj,Krhs_a)-zub(ji,jj))*umask(ji,jj,jk) 196 END DO 197 END DO 198 END DO 199 188 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 189 END DO 190 END DO 191 END DO 192 ! 200 193 IF( ln_dynspg_ts ) THEN ! Set tangential velocities to time splitting estimate 201 ibdy1 = jpiglo -nbghostcells202 ibdy2 = jpiglo -1194 ibdy1 = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 195 ibdy2 = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 203 196 DO ji = mi0(ibdy1), mi1(ibdy2) 204 197 zvb(ji,:) = 0._wp 205 198 DO jk = 1, jpkm1 206 199 DO jj = 1, jpj 207 zvb(ji,jj) = zvb(ji,jj) & 208 & + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 200 zvb(ji,jj) = zvb(ji,jj) + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 209 201 END DO 210 202 END DO … … 214 206 DO jk = 1, jpkm1 215 207 DO jj = 1, jpj 216 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) & 217 & + vv_b(ji,jj,Krhs_a)-zvb(ji,jj)) * vmask(ji,jj,jk) 208 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) ) * vmask(ji,jj,jk) 218 209 END DO 219 210 END DO 220 211 END DO 221 212 ENDIF 213 ! 222 214 ENDIF 223 215 224 216 ! --- South --- ! 225 217 IF( lk_south ) THEN 226 jbdy1 = 2227 jbdy2 = 1+nbghostcells218 jbdy1 = nn_hls + 2 ! halo + land + 1 219 jbdy2 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 228 220 ! 229 221 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport … … 232 224 DO jk = 1, jpkm1 233 225 DO ji = 1, jpi 234 vv_b(ji,jj,Krhs_a) = vv_b(ji,jj,Krhs_a) & 235 & + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 226 vv_b(ji,jj,Krhs_a) = vv_b(ji,jj,Krhs_a) + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 236 227 END DO 237 228 END DO … … 246 237 DO jk=1,jpkm1 247 238 DO ji=1,jpi 248 zvb(ji,jj) = zvb(ji,jj) & 249 & + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 239 zvb(ji,jj) = zvb(ji,jj) + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 250 240 END DO 251 241 END DO … … 253 243 zvb(ji,jj) = zvb(ji,jj) * r1_hv(ji,jj,Krhs_a) 254 244 END DO 255 256 245 DO jk = 1, jpkm1 257 246 DO ji = 1, jpi 258 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) & 259 & + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) ) * vmask(ji,jj,jk) 260 END DO 261 END DO 262 END DO 263 247 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) ) * vmask(ji,jj,jk) 248 END DO 249 END DO 250 END DO 251 ! 264 252 IF( ln_dynspg_ts ) THEN ! Set tangential velocities to time splitting estimate 265 253 DO jj = mj0(jbdy1), mj1(jbdy2) … … 267 255 DO jk = 1, jpkm1 268 256 DO ji = 1, jpi 269 zub(ji,jj) = zub(ji,jj) & 270 & + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 257 zub(ji,jj) = zub(ji,jj) + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 271 258 END DO 272 259 END DO … … 274 261 zub(ji,jj) = zub(ji,jj) * r1_hu(ji,jj,Krhs_a) 275 262 END DO 276 277 263 DO jk = 1, jpkm1 278 264 DO ji = 1, jpi 279 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) & 280 & + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 265 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 281 266 END DO 282 267 END DO 283 268 END DO 284 269 ENDIF 270 ! 285 271 ENDIF 286 272 287 273 ! --- North --- ! 288 274 IF( lk_north ) THEN 289 jbdy1 = jpjglo -1-nbghostcells290 jbdy2 = jpjglo -2275 jbdy1 = jpjglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 276 jbdy2 = jpjglo - ( nn_hls + 2 ) ! halo + land + 1 291 277 ! 292 278 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport … … 295 281 DO jk = 1, jpkm1 296 282 DO ji = 1, jpi 297 vv_b(ji,jj,Krhs_a) = vv_b(ji,jj,Krhs_a) & 298 & + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 283 vv_b(ji,jj,Krhs_a) = vv_b(ji,jj,Krhs_a) + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 299 284 END DO 300 285 END DO … … 309 294 DO jk=1,jpkm1 310 295 DO ji=1,jpi 311 zvb(ji,jj) = zvb(ji,jj) & 312 & + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 296 zvb(ji,jj) = zvb(ji,jj) + e3v(ji,jj,jk,Krhs_a) * vv(ji,jj,jk,Krhs_a) * vmask(ji,jj,jk) 313 297 END DO 314 298 END DO … … 316 300 zvb(ji,jj) = zvb(ji,jj) * r1_hv(ji,jj,Krhs_a) 317 301 END DO 318 319 302 DO jk = 1, jpkm1 320 303 DO ji = 1, jpi 321 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) & 322 & + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) ) * vmask(ji,jj,jk) 323 END DO 324 END DO 325 END DO 326 304 vv(ji,jj,jk,Krhs_a) = ( vv(ji,jj,jk,Krhs_a) + vv_b(ji,jj,Krhs_a) - zvb(ji,jj) ) * vmask(ji,jj,jk) 305 END DO 306 END DO 307 END DO 308 ! 327 309 IF( ln_dynspg_ts ) THEN ! Set tangential velocities to time splitting estimate 328 jbdy1 = jpjglo -nbghostcells329 jbdy2 = jpjglo -1310 jbdy1 = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 311 jbdy2 = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 330 312 DO jj = mj0(jbdy1), mj1(jbdy2) 331 313 zub(:,jj) = 0._wp 332 314 DO jk = 1, jpkm1 333 315 DO ji = 1, jpi 334 zub(ji,jj) = zub(ji,jj) & 335 & + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 316 zub(ji,jj) = zub(ji,jj) + e3u(ji,jj,jk,Krhs_a) * uu(ji,jj,jk,Krhs_a) * umask(ji,jj,jk) 336 317 END DO 337 318 END DO … … 339 320 zub(ji,jj) = zub(ji,jj) * r1_hu(ji,jj,Krhs_a) 340 321 END DO 341 342 322 DO jk = 1, jpkm1 343 323 DO ji = 1, jpi 344 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) & 345 & + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 324 uu(ji,jj,jk,Krhs_a) = ( uu(ji,jj,jk,Krhs_a) + uu_b(ji,jj,Krhs_a) - zub(ji,jj) ) * umask(ji,jj,jk) 346 325 END DO 347 326 END DO 348 327 END DO 349 328 ENDIF 329 ! 350 330 ENDIF 351 331 ! … … 367 347 !--- West ---! 368 348 IF( lk_west ) THEN 369 istart = 2370 iend = n bghostcells+1349 istart = nn_hls + 2 ! halo + land + 1 350 iend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 371 351 DO ji = mi0(istart), mi1(iend) 372 352 DO jj=1,jpj … … 379 359 !--- East ---! 380 360 IF( lk_east ) THEN 381 istart = jpiglo -nbghostcells382 iend = jpiglo -1361 istart = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 362 iend = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 383 363 DO ji = mi0(istart), mi1(iend) 384 364 … … 387 367 END DO 388 368 END DO 389 istart = jpiglo -nbghostcells-1390 iend = jpiglo -2369 istart = jpiglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 370 iend = jpiglo - ( nn_hls + 2 ) ! halo + land + 1 391 371 DO ji = mi0(istart), mi1(iend) 392 372 DO jj=1,jpj … … 398 378 !--- South ---! 399 379 IF( lk_south ) THEN 400 jstart = 2401 jend = n bghostcells+1380 jstart = nn_hls + 2 ! halo + land + 1 381 jend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 402 382 DO jj = mj0(jstart), mj1(jend) 403 383 … … 411 391 !--- North ---! 412 392 IF( lk_north ) THEN 413 jstart = jpjglo -nbghostcells414 jend = jpjglo -1393 jstart = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 394 jend = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 415 395 DO jj = mj0(jstart), mj1(jend) 416 396 DO ji=1,jpi … … 418 398 END DO 419 399 END DO 420 jstart = jpjglo -nbghostcells-1421 jend = jpjglo -2400 jstart = jpjglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 401 jend = jpjglo - ( nn_hls + 2 ) ! halo + land + 1 422 402 DO jj = mj0(jstart), mj1(jend) 423 403 DO ji=1,jpi … … 429 409 END SUBROUTINE Agrif_dyn_ts 430 410 411 431 412 SUBROUTINE Agrif_dyn_ts_flux( jn, zu, zv ) 432 413 !!---------------------------------------------------------------------- … … 444 425 !--- West ---! 445 426 IF( lk_west ) THEN 446 istart = 2447 iend = n bghostcells+1427 istart = nn_hls + 2 ! halo + land + 1 428 iend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 448 429 DO ji = mi0(istart), mi1(iend) 449 430 DO jj=1,jpj … … 456 437 !--- East ---! 457 438 IF( lk_east ) THEN 458 istart = jpiglo -nbghostcells459 iend = jpiglo -1439 istart = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 440 iend = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 460 441 DO ji = mi0(istart), mi1(iend) 461 442 DO jj=1,jpj … … 463 444 END DO 464 445 END DO 465 istart = jpiglo -nbghostcells-1466 iend = jpiglo -2446 istart = jpiglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 447 iend = jpiglo - ( nn_hls + 2 ) ! halo + land + 1 467 448 DO ji = mi0(istart), mi1(iend) 468 449 DO jj=1,jpj … … 474 455 !--- South ---! 475 456 IF( lk_south ) THEN 476 jstart = 2477 jend = n bghostcells+1457 jstart = nn_hls + 2 ! halo + land + 1 458 jend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 478 459 DO jj = mj0(jstart), mj1(jend) 479 460 DO ji=1,jpi … … 486 467 !--- North ---! 487 468 IF( lk_north ) THEN 488 jstart = jpjglo -nbghostcells489 jend = jpjglo -1469 jstart = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 470 jend = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 490 471 DO jj = mj0(jstart), mj1(jend) 491 472 DO ji=1,jpi … … 493 474 END DO 494 475 END DO 495 jstart = jpjglo -nbghostcells-1496 jend = jpjglo -2476 jstart = jpjglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 477 jend = jpjglo - ( nn_hls + 2 ) ! halo + land + 1 497 478 DO jj = mj0(jstart), mj1(jend) 498 479 DO ji=1,jpi … … 504 485 END SUBROUTINE Agrif_dyn_ts_flux 505 486 487 506 488 SUBROUTINE Agrif_dta_ts( kt ) 507 489 !!---------------------------------------------------------------------- … … 578 560 ! --- West --- ! 579 561 IF(lk_west) THEN 580 istart = 2581 iend = 1+ nbghostcells562 istart = nn_hls + 2 ! halo + land + 1 563 iend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 582 564 DO ji = mi0(istart), mi1(iend) 583 565 DO jj = 1, jpj 584 566 ssh(ji,jj,Krhs_a) = hbdy(ji,jj) 585 END DO586 END DO567 END DO 568 END DO 587 569 ENDIF 588 570 ! 589 571 ! --- East --- ! 590 572 IF(lk_east) THEN 591 istart = jpiglo - nbghostcells592 iend = jpiglo - 1573 istart = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 574 iend = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 593 575 DO ji = mi0(istart), mi1(iend) 594 576 DO jj = 1, jpj 595 577 ssh(ji,jj,Krhs_a) = hbdy(ji,jj) 596 END DO597 END DO578 END DO 579 END DO 598 580 ENDIF 599 581 ! 600 582 ! --- South --- ! 601 583 IF(lk_south) THEN 602 jstart = 2603 jend = 1+ nbghostcells584 jstart = nn_hls + 2 ! halo + land + 1 585 jend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 604 586 DO jj = mj0(jstart), mj1(jend) 605 587 DO ji = 1, jpi 606 588 ssh(ji,jj,Krhs_a) = hbdy(ji,jj) 607 END DO608 END DO589 END DO 590 END DO 609 591 ENDIF 610 592 ! 611 593 ! --- North --- ! 612 594 IF(lk_north) THEN 613 jstart = jpjglo - nbghostcells614 jend = jpjglo - 1595 jstart = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 596 jend = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 615 597 DO jj = mj0(jstart), mj1(jend) 616 598 DO ji = 1, jpi 617 599 ssh(ji,jj,Krhs_a) = hbdy(ji,jj) 618 END DO619 END DO600 END DO 601 END DO 620 602 ENDIF 621 603 ! … … 637 619 ! --- West --- ! 638 620 IF(lk_west) THEN 639 istart = 2640 iend = 1+nbghostcells621 istart = nn_hls + 2 ! halo + land + 1 622 iend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 641 623 DO ji = mi0(istart), mi1(iend) 642 624 DO jj = 1, jpj 643 625 ssha_e(ji,jj) = hbdy(ji,jj) 644 END DO645 END DO626 END DO 627 END DO 646 628 ENDIF 647 629 ! 648 630 ! --- East --- ! 649 631 IF(lk_east) THEN 650 istart = jpiglo - nbghostcells651 iend = jpiglo - 1632 istart = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 633 iend = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 652 634 DO ji = mi0(istart), mi1(iend) 653 635 DO jj = 1, jpj 654 636 ssha_e(ji,jj) = hbdy(ji,jj) 655 END DO656 END DO637 END DO 638 END DO 657 639 ENDIF 658 640 ! 659 641 ! --- South --- ! 660 642 IF(lk_south) THEN 661 jstart = 2662 jend = 1+nbghostcells643 jstart = nn_hls + 2 ! halo + land + 1 644 jend = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 663 645 DO jj = mj0(jstart), mj1(jend) 664 646 DO ji = 1, jpi 665 647 ssha_e(ji,jj) = hbdy(ji,jj) 666 END DO667 END DO648 END DO 649 END DO 668 650 ENDIF 669 651 ! 670 652 ! --- North --- ! 671 653 IF(lk_north) THEN 672 jstart = jpjglo - nbghostcells673 jend = jpjglo - 1654 jstart = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 655 jend = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 674 656 DO jj = mj0(jstart), mj1(jend) 675 657 DO ji = 1, jpi 676 658 ssha_e(ji,jj) = hbdy(ji,jj) 677 END DO678 END DO659 END DO 660 END DO 679 661 ENDIF 680 662 ! 681 663 END SUBROUTINE Agrif_ssh_ts 682 664 665 683 666 SUBROUTINE Agrif_avm 684 667 !!---------------------------------------------------------------------- … … 701 684 ! 702 685 END SUBROUTINE Agrif_avm 703 686 704 687 705 688 SUBROUTINE interptsn( ptab, i1, i2, j1, j2, k1, k2, n1, n2, before ) … … 793 776 DO jk=2,N_in 794 777 z_in(jk) = z_in(jk-1) + 0.5_wp * h_in(jk) 795 END DO778 END DO 796 779 797 780 N_out = 0 … … 800 783 N_out = N_out + 1 801 784 h_out(jk) = e3t(ji,jj,jk,Krhs_a) 802 END DO785 END DO 803 786 804 787 z_out(1) = 0.5_wp * h_out(1) - SUM(h_out(1:N_out)) + ht_0(ji,jj) 805 788 DO jk=2,N_out 806 789 z_out(jk) = z_out(jk-1) + 0.5_wp * h_out(jk) 807 END DO790 END DO 808 791 809 792 IF (N_in*N_out > 0) THEN … … 816 799 ENDIF 817 800 ENDIF 818 END DO819 END DO801 END DO 802 END DO 820 803 Krhs_a = item 821 804 … … 831 814 END SUBROUTINE interptsn 832 815 816 833 817 SUBROUTINE interpsshn( ptab, i1, i2, j1, j2, before ) 834 818 !!---------------------------------------------------------------------- … … 849 833 END SUBROUTINE interpsshn 850 834 835 851 836 SUBROUTINE interpun( ptab, i1, i2, j1, j2, k1, k2, m1, m2, before ) 852 837 !!---------------------------------------------------------------------- … … 934 919 tabin(jk) = 0. 935 920 ENDIF 936 END DO921 END DO 937 922 z_in(1) = 0.5_wp * h_in(1) - zhtot + hu0_parent(ji,jj) 938 923 DO jk=2,N_in 939 924 z_in(jk) = z_in(jk-1) + 0.5_wp * h_in(jk) 940 END DO925 END DO 941 926 942 927 N_out = 0 … … 945 930 N_out = N_out + 1 946 931 h_out(N_out) = e3u(ji,jj,jk,Krhs_a) 947 END DO932 END DO 948 933 949 934 z_out(1) = 0.5_wp * h_out(1) - SUM(h_out(1:N_out)) + hu_0(ji,jj) 950 935 DO jk=2,N_out 951 936 z_out(jk) = z_out(jk-1) + 0.5_wp * h_out(jk) 952 END DO937 END DO 953 938 954 939 IF (N_in*N_out > 0) THEN … … 959 944 ENDIF 960 945 ENDIF 961 END DO962 END DO946 END DO 947 END DO 963 948 ELSE 964 949 DO jk = 1, jpkm1 … … 973 958 END SUBROUTINE interpun 974 959 960 975 961 SUBROUTINE interpvn( ptab, i1, i2, j1, j2, k1, k2, m1, m2, before ) 976 962 !!---------------------------------------------------------------------- … … 1055 1041 tabin(jk) = 0. 1056 1042 ENDIF 1057 END DO1043 END DO 1058 1044 1059 1045 z_in(1) = 0.5_wp * h_in(1) - zhtot + hv0_parent(ji,jj) 1060 1046 DO jk=2,N_in 1061 1047 z_in(jk) = z_in(jk-1) + 0.5_wp * h_in(jk) 1062 END DO1048 END DO 1063 1049 1064 1050 N_out = 0 … … 1067 1053 N_out = N_out + 1 1068 1054 h_out(N_out) = e3v(ji,jj,jk,Krhs_a) 1069 END DO1055 END DO 1070 1056 1071 1057 z_out(1) = 0.5_wp * h_out(1) - SUM(h_out(1:N_out)) + hv_0(ji,jj) 1072 1058 DO jk=2,N_out 1073 1059 z_out(jk) = z_out(jk-1) + 0.5_wp * h_out(jk) 1074 END DO1060 END DO 1075 1061 1076 1062 IF (N_in*N_out > 0) THEN … … 1286 1272 WRITE(numout,*) ' Agrif error for e3t_0: parent , child, i, j, k ', & 1287 1273 & ptab(ji,jj,jk), tmask(ji,jj,jk) * e3t_0(ji,jj,jk), & 1288 & ji+nimpp-1, jj+njmpp-1, jk1289 kindic_agr = kindic_agr + 11274 & mig0(ji), mig0(jj), jk 1275 ! kindic_agr = kindic_agr + 1 1290 1276 ENDIF 1291 1277 END DO … … 1296 1282 ! 1297 1283 END SUBROUTINE interpe3t 1284 1285 SUBROUTINE interpglamt( ptab, i1, i2, j1, j2, before ) 1286 !!---------------------------------------------------------------------- 1287 !! *** ROUTINE interpglamt *** 1288 !!---------------------------------------------------------------------- 1289 INTEGER , INTENT(in ) :: i1, i2, j1, j2 1290 REAL(wp),DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab 1291 LOGICAL , INTENT(in ) :: before 1292 ! 1293 INTEGER :: ji, jj, jk 1294 REAL(wp):: ztst 1295 !!---------------------------------------------------------------------- 1296 ! 1297 IF( before ) THEN 1298 ptab(i1:i2,j1:j2) = glamt(i1:i2,j1:j2) 1299 ELSE 1300 ztst = MAXVAL(ABS(glamt(i1:i2,j1:j2)))*1.e-4 1301 DO jj = j1, j2 1302 DO ji = i1, i2 1303 IF( ABS( ptab(ji,jj) - glamt(ji,jj) ) > ztst ) THEN 1304 WRITE(numout,*) ' Agrif error for glamt: parent, child, i, j ', ptab(ji,jj), glamt(ji,jj), mig0(ji), mig0(jj) 1305 ! kindic_agr = kindic_agr + 1 1306 ENDIF 1307 END DO 1308 END DO 1309 ENDIF 1310 ! 1311 END SUBROUTINE interpglamt 1312 1313 1314 SUBROUTINE interpgphit( ptab, i1, i2, j1, j2, before ) 1315 !!---------------------------------------------------------------------- 1316 !! *** ROUTINE interpgphit *** 1317 !!---------------------------------------------------------------------- 1318 INTEGER , INTENT(in ) :: i1, i2, j1, j2 1319 REAL(wp),DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab 1320 LOGICAL , INTENT(in ) :: before 1321 ! 1322 INTEGER :: ji, jj, jk 1323 REAL(wp):: ztst 1324 !!---------------------------------------------------------------------- 1325 ! 1326 IF( before ) THEN 1327 ptab(i1:i2,j1:j2) = gphit(i1:i2,j1:j2) 1328 ELSE 1329 ztst = MAXVAL(ABS(gphit(i1:i2,j1:j2)))*1.e-4 1330 DO jj = j1, j2 1331 DO ji = i1, i2 1332 IF( ABS( ptab(ji,jj) - gphit(ji,jj) ) > ztst ) THEN 1333 WRITE(numout,*) ' Agrif error for gphit: parent, child, i, j ', ptab(ji,jj), gphit(ji,jj), mig0(ji), mig0(jj) 1334 ! kindic_agr = kindic_agr + 1 1335 ENDIF 1336 END DO 1337 END DO 1338 ENDIF 1339 ! 1340 END SUBROUTINE interpgphit 1341 1298 1342 1299 1343 SUBROUTINE interpavm( ptab, i1, i2, j1, j2, k1, k2, m1, m2, before ) … … 1368 1412 DO jk = 1, N_out ! Child vertical grid 1369 1413 z_out(jk) = gdepw(ji,jj,jk,Kmm_a) 1370 END DO1414 END DO 1371 1415 IF (N_in*N_out > 0) THEN 1372 1416 CALL remap_linear(tabin(1:N_in),z_in(1:N_in),avm_k(ji,jj,1:N_out),z_out(1:N_out),N_in,N_out,1) 1373 1417 ENDIF 1374 END DO1375 END DO1418 END DO 1419 END DO 1376 1420 ELSE 1377 1421 avm_k(i1:i2,j1:j2,k1:k2) = ptab (i1:i2,j1:j2,k1:k2,1) … … 1381 1425 END SUBROUTINE interpavm 1382 1426 1427 1383 1428 SUBROUTINE interpmbkt( ptab, i1, i2, j1, j2, before ) 1384 1429 !!---------------------------------------------------------------------- … … 1399 1444 END SUBROUTINE interpmbkt 1400 1445 1446 1401 1447 SUBROUTINE interpht0( ptab, i1, i2, j1, j2, before ) 1402 1448 !!---------------------------------------------------------------------- … … 1417 1463 END SUBROUTINE interpht0 1418 1464 1465 1419 1466 SUBROUTINE agrif_initts(tabres,i1,i2,j1,j2,k1,k2,m1,m2,before) 1420 1467 INTEGER :: i1, i2, j1, j2, k1, k2, m1, m2 … … 1435 1482 END SUBROUTINE agrif_initts 1436 1483 1484 1437 1485 SUBROUTINE agrif_initssh( ptab, i1, i2, j1, j2, before ) 1438 1486 !!---------------------------------------------------------------------- -
NEMO/trunk/src/NST/agrif_oce_sponge.F90
r13226 r13286 78 78 zcoef = REAL(Agrif_rhot()-1,wp)/REAL(Agrif_rhot()) 79 79 80 Agrif_SpecialValue =0.80 Agrif_SpecialValue = 0._wp 81 81 Agrif_UseSpecialValue = ln_spc_dyn 82 use_sign_north = .TRUE.83 sign_north = -1.82 use_sign_north = .TRUE. 83 sign_north = -1._wp 84 84 ! 85 85 tabspongedone_u = .FALSE. … … 92 92 ! 93 93 Agrif_UseSpecialValue = .FALSE. 94 use_sign_north = .FALSE.94 use_sign_north = .FALSE. 95 95 #endif 96 96 ! … … 109 109 REAL(wp) :: z1_ispongearea, z1_jspongearea 110 110 REAL(wp), DIMENSION(jpi,jpj) :: ztabramp 111 #if defined key_vertical 112 REAL(wp), DIMENSION(jpi,jpj) :: ztabrampu 113 REAL(wp), DIMENSION(jpi,jpj) :: ztabrampv 114 #endif 111 115 REAL(wp), DIMENSION(jpjmax) :: zmskwest, zmskeast 112 116 REAL(wp), DIMENSION(jpimax) :: zmsknorth, zmsksouth … … 129 133 ! Retrieve masks at open boundaries: 130 134 131 ! --- West --- ! 132 IF( lk_west) THEN 135 IF( lk_west ) THEN ! --- West --- ! 133 136 ztabramp(:,:) = 0._wp 134 ind1 = 1+nbghostcells137 ind1 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 135 138 DO ji = mi0(ind1), mi1(ind1) 136 139 ztabramp(ji,:) = ssumask(ji,:) 137 140 END DO 138 ! 139 zmskwest(:) = 0._wp 140 zmskwest(1:jpj) = MAXVAL(ztabramp(:,:), dim=1) 141 zmskwest( 1:jpj ) = MAXVAL(ztabramp(:,:), dim=1) 142 zmskwest(jpj+1:jpjmax) = 0._wp 141 143 ENDIF 142 143 ! --- East --- ! 144 IF( lk_east ) THEN 144 IF( lk_east ) THEN ! --- East --- ! 145 145 ztabramp(:,:) = 0._wp 146 ind1 = jpiglo - nbghostcells - 1146 ind1 = jpiglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 147 147 DO ji = mi0(ind1), mi1(ind1) 148 148 ztabramp(ji,:) = ssumask(ji,:) 149 149 END DO 150 ! 151 zmskeast(:) = 0._wp 152 zmskeast(1:jpj) = MAXVAL(ztabramp(:,:), dim=1) 150 zmskeast( 1:jpj ) = MAXVAL(ztabramp(:,:), dim=1) 151 zmskeast(jpj+1:jpjmax) = 0._wp 153 152 ENDIF 154 155 ! --- South --- ! 156 IF( lk_south ) THEN 153 IF( lk_south ) THEN ! --- South --- ! 157 154 ztabramp(:,:) = 0._wp 158 ind1 = 1+nbghostcells155 ind1 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 159 156 DO jj = mj0(ind1), mj1(ind1) 160 157 ztabramp(:,jj) = ssvmask(:,jj) 161 158 END DO 162 ! 163 zmsksouth(:) = 0._wp 164 zmsksouth(1:jpi) = MAXVAL(ztabramp(:,:), dim=2) 159 zmsksouth( 1:jpi ) = MAXVAL(ztabramp(:,:), dim=2) 160 zmsksouth(jpi+1:jpimax) = 0._wp 165 161 ENDIF 166 167 ! --- North --- ! 168 IF( lk_north) THEN 162 IF( lk_north ) THEN ! --- North --- ! 169 163 ztabramp(:,:) = 0._wp 170 ind1 = jpjglo - nbghostcells - 1164 ind1 = jpjglo - ( nn_hls + nbghostcells + 1) ! halo + land + nbghostcells 171 165 DO jj = mj0(ind1), mj1(ind1) 172 166 ztabramp(:,jj) = ssvmask(:,jj) 173 167 END DO 174 ! 175 zmsknorth(:) = 0._wp 176 zmsknorth(1:jpi) = MAXVAL(ztabramp(:,:), dim=2) 168 zmsknorth( 1:jpi ) = MAXVAL(ztabramp(:,:), dim=2) 169 zmsknorth(jpi+1:jpimax) = 0._wp 177 170 ENDIF 178 171 … … 180 173 zmskwest(:) = 1._wp 181 174 zmskeast(:) = 1._wp 175 zmsksouth(:) = 1._wp 182 176 zmsknorth(:) = 1._wp 183 zmsksouth(:) = 1._wp184 177 #if defined key_mpp_mpi 185 178 ! CALL mpp_max( 'AGRIF_sponge', zmskwest(:) , jpjmax ) … … 192 185 ! Store it in ztabramp 193 186 194 ispongearea = nn_sponge_len * Agrif_irhox()195 z1_ispongearea = 1._wp / REAL( ispongearea )196 jspongearea = nn_sponge_len * Agrif_irhoy()197 z1_jspongearea = 1._wp / REAL( jspongearea )187 ispongearea = nn_sponge_len * Agrif_irhox() 188 z1_ispongearea = 1._wp / REAL( ispongearea, wp ) 189 jspongearea = nn_sponge_len * Agrif_irhoy() 190 z1_jspongearea = 1._wp / REAL( jspongearea, wp ) 198 191 199 192 ztabramp(:,:) = 0._wp … … 203 196 IF ( nbcellsy <= 3 ) jspongearea = -1 204 197 205 ! --- West --- ! 206 IF(lk_west) THEN 207 ind1 = 1+nbghostcells 208 ind2 = 1+nbghostcells + ispongearea 198 IF( lk_west ) THEN ! --- West --- ! 199 ind1 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 200 ind2 = nn_hls + 1 + nbghostcells + ispongearea 209 201 DO ji = mi0(ind1), mi1(ind2) 210 202 DO jj = 1, jpj 211 ztabramp(ji,jj) = REAL( ind2 - mig(ji) ) * z1_ispongearea * zmskwest(jj) 212 END DO 213 END DO 214 203 ztabramp(ji,jj) = REAL(ind2 - mig(ji), wp) * z1_ispongearea * zmskwest(jj) 204 END DO 205 END DO 215 206 ! ghost cells: 216 207 ind1 = 1 217 ind2 = n bghostcells + 1208 ind2 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 218 209 DO ji = mi0(ind1), mi1(ind2) 219 210 DO jj = 1, jpj … … 222 213 END DO 223 214 ENDIF 224 225 ! --- East --- ! 226 IF(lk_east) THEN 227 ind1 = jpiglo - nbghostcells - ispongearea 228 ind2 = jpiglo - nbghostcells 215 IF( lk_east ) THEN ! --- East --- ! 216 ind1 = jpiglo - ( nn_hls + nbghostcells ) - ispongearea 217 ind2 = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 229 218 DO ji = mi0(ind1), mi1(ind2) 230 231 219 DO jj = 1, jpj 232 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( mig(ji) - ind1 ) * z1_ispongearea) * zmskeast(jj) 233 ENDDO 234 END DO 235 220 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL(mig(ji) - ind1, wp) * z1_ispongearea ) * zmskeast(jj) 221 END DO 222 END DO 236 223 ! ghost cells: 237 ind1 = jpiglo - nbghostcells224 ind1 = jpiglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 238 225 ind2 = jpiglo 239 226 DO ji = mi0(ind1), mi1(ind2) 240 241 227 DO jj = 1, jpj 242 228 ztabramp(ji,jj) = zmskeast(jj) 243 ENDDO 244 END DO 245 ENDIF 246 247 ! --- South --- ! 248 IF( lk_south ) THEN 249 ind1 = 1+nbghostcells 250 ind2 = 1+nbghostcells + jspongearea 229 END DO 230 END DO 231 ENDIF 232 IF( lk_south ) THEN ! --- South --- ! 233 ind1 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 234 ind2 = nn_hls + 1 + nbghostcells + jspongearea 251 235 DO jj = mj0(ind1), mj1(ind2) 252 236 DO ji = 1, jpi 253 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( ind2 - mjg(jj) ) * z1_jspongearea) * zmsksouth(ji) 254 END DO 255 END DO 256 237 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL(ind2 - mjg(jj), wp) * z1_jspongearea ) * zmsksouth(ji) 238 END DO 239 END DO 257 240 ! ghost cells: 258 241 ind1 = 1 259 ind2 = n bghostcells + 1242 ind2 = nn_hls + 1 + nbghostcells ! halo + land + nbghostcells 260 243 DO jj = mj0(ind1), mj1(ind2) 261 244 DO ji = 1, jpi … … 264 247 END DO 265 248 ENDIF 266 267 ! --- North --- ! 268 IF( lk_north ) THEN 269 ind1 = jpjglo - nbghostcells - jspongearea 270 ind2 = jpjglo - nbghostcells 249 IF( lk_north ) THEN ! --- North --- ! 250 ind1 = jpjglo - ( nn_hls + nbghostcells ) - jspongearea 251 ind2 = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 271 252 DO jj = mj0(ind1), mj1(ind2) 272 253 DO ji = 1, jpi 273 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL( mjg(jj) - ind1 ) * z1_jspongearea) * zmsknorth(ji) 274 END DO 275 END DO 276 254 ztabramp(ji,jj) = MAX( ztabramp(ji,jj), REAL(mjg(jj) - ind1, wp) * z1_jspongearea ) * zmsknorth(ji) 255 END DO 256 END DO 277 257 ! ghost cells: 278 ind1 = jpjglo - nbghostcells258 ind1 = jpjglo - ( nn_hls + nbghostcells ) ! halo + land + nbghostcells - 1 279 259 ind2 = jpjglo 280 260 DO jj = mj0(ind1), mj1(ind2) … … 284 264 END DO 285 265 ENDIF 286 266 ! 287 267 ENDIF 288 268 … … 295 275 fspv(ji,jj) = 0.5_wp * ( ztabramp(ji,jj) + ztabramp(ji ,jj+1) ) * ssvmask(ji,jj) 296 276 END_2D 297 CALL lbc_lnk( 'agrif_Sponge', fspu, 'U', 1.0_wp ) ! Lateral boundary conditions298 CALL lbc_lnk( 'agrif_Sponge', fspv, 'V', 1.0_wp )299 300 spongedoneT = .TRUE.301 277 ENDIF 302 278 … … 311 287 & * ssvmask(ji,jj) * ssvmask(ji,jj+1) 312 288 END_2D 313 CALL lbc_lnk( 'agrif_Sponge', fspt, 'T', 1.0_wp ) ! Lateral boundary conditions 314 CALL lbc_lnk( 'agrif_Sponge', fspf, 'F', 1.0_wp ) 315 289 ENDIF 290 291 IF( .NOT. spongedoneT .AND. .NOT. spongedoneU ) THEN 292 CALL lbc_lnk_multi( 'agrif_Sponge', fspu, 'U', 1._wp, fspv, 'V', 1._wp, fspt, 'T', 1._wp, fspf, 'F', 1._wp ) 293 spongedoneT = .TRUE. 294 spongedoneU = .TRUE. 295 ENDIF 296 IF( .NOT. spongedoneT ) THEN 297 CALL lbc_lnk_multi( 'agrif_Sponge', fspu, 'U', 1._wp, fspv, 'V', 1._wp ) 298 spongedoneT = .TRUE. 299 ENDIF 300 IF( .NOT. spongedoneT .AND. .NOT. spongedoneU ) THEN 301 CALL lbc_lnk_multi( 'agrif_Sponge', fspt, 'T', 1._wp, fspf, 'F', 1._wp ) 316 302 spongedoneU = .TRUE. 317 303 ENDIF … … 334 320 END_2D 335 321 ! 336 ztabramp(:,:) = REAL( mbkt_parent(:,:), wp ) ; CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'T', 1.0_wp ) 337 mbkt_parent(:,:) = NINT( ztabramp(:,:) ) 338 ztabramp(:,:) = REAL( mbku_parent(:,:), wp ) ; CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'U', 1.0_wp ) 339 mbku_parent(:,:) = NINT( ztabramp(:,:) ) 340 ztabramp(:,:) = REAL( mbkv_parent(:,:), wp ) ; CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'V', 1.0_wp ) 341 mbkv_parent(:,:) = NINT( ztabramp(:,:) ) 322 ztabramp (:,:) = REAL( mbkt_parent (:,:), wp ) 323 ztabrampu(:,:) = REAL( mbku_parentu(:,:), wp ) 324 ztabrampv(:,:) = REAL( mbkv_parentv(:,:), wp ) 325 CALL lbc_lnk_multi( 'Agrif_Sponge', ztabramp, 'T', 1._wp, ztabrampu, 'U', 1._wp, ztabrampv, 'V', 1._wp ) 326 mbkt_parent(:,:) = NINT( ztabramp (:,:) ) 327 mbku_parent(:,:) = NINT( ztabrampu(:,:) ) 328 mbkv_parent(:,:) = NINT( ztabrampv(:,:) ) 342 329 #endif 343 330 ! … … 346 333 END SUBROUTINE Agrif_Sponge 347 334 335 348 336 SUBROUTINE interptsn_sponge( tabres, i1, i2, j1, j2, k1, k2, n1, n2, before ) 349 337 !!---------------------------------------------------------------------- … … 433 421 N_out = N_out + 1 434 422 h_out(jk) = e3t(ji,jj,jk,Kbb_a) !Child grid scale factors. Could multiply by e1e2t here instead of division above 435 END DO423 END DO 436 424 437 425 ! Account for small differences in free-surface … … 444 432 CALL reconstructandremap(tabin(1:N_in,1:jpts),h_in(1:N_in),tabres_child(ji,jj,1:N_out,1:jpts),h_out(1:N_out),N_in,N_out,jpts) 445 433 ENDIF 446 END DO447 END DO434 END DO 435 END DO 448 436 # endif 449 437 … … 456 444 tsbdiff(ji,jj,jk,1:jpts) = (ts(ji,jj,jk,1:jpts,Kbb_a) - tabres(ji,jj,jk,1:jpts))*tmask(ji,jj,jk) 457 445 # endif 458 END DO459 END DO460 END DO446 END DO 447 END DO 448 END DO 461 449 462 450 DO jn = 1, jpts … … 513 501 END SUBROUTINE interptsn_sponge 514 502 503 515 504 SUBROUTINE interpun_sponge(tabres,i1,i2,j1,j2,k1,k2,m1,m2, before) 516 505 !!--------------------------------------------- … … 521 510 LOGICAL, INTENT(in) :: before 522 511 523 INTEGER :: ji,jj,jk,jmax524 512 INTEGER :: ji,jj,jk,jmax 513 INTEGER :: ind1 525 514 ! sponge parameters 526 515 REAL(wp) :: ze2u, ze1v, zua, zva, zbtr, zhtot … … 586 575 zhtot = zhtot + h_in(jk) 587 576 tabin(jk) = tabres(ji,jj,jk,m1) 588 END DO577 END DO 589 578 ! 590 579 N_out = 0 … … 593 582 N_out = N_out + 1 594 583 h_out(N_out) = e3u(ji,jj,jk,Kbb_a) 595 END DO584 END DO 596 585 597 586 ! Account for small differences in free-surface … … 605 594 CALL reconstructandremap(tabin(1:N_in),h_in(1:N_in),tabres_child(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out,1) 606 595 ENDIF 607 END DO608 END DO596 END DO 597 END DO 609 598 610 599 ubdiff(i1:i2,j1:j2,:) = (uu(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:))*umask(i1:i2,j1:j2,:) … … 659 648 660 649 jmax = j2-1 661 ! IF (lk_north) jmax = MIN(jmax,nlcj-nbghostcells-2) ! North 662 IF ((nbondj == 1).OR.(nbondj == 2)) jmax = MIN(jmax,nlcj-nbghostcells-2) ! North 650 ind1 = jpjglo - ( nn_hls + nbghostcells + 2 ) ! North 651 DO jj = mj0(ind1), mj1(ind1) 652 jmax = MIN(jmax,jj) 653 END DO 663 654 664 655 DO jj = j1+1, jmax … … 688 679 END SUBROUTINE interpun_sponge 689 680 690 SUBROUTINE interpvn_sponge(tabres,i1,i2,j1,j2,k1,k2,m1,m2, before,nb,ndir) 681 682 SUBROUTINE interpvn_sponge(tabres,i1,i2,j1,j2,k1,k2,m1,m2, before) 691 683 !!--------------------------------------------- 692 684 !! *** ROUTINE interpvn_sponge *** … … 695 687 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2,m1:m2), INTENT(inout) :: tabres 696 688 LOGICAL, INTENT(in) :: before 697 INTEGER, INTENT(in) :: nb , ndir698 689 ! 699 690 INTEGER :: ji, jj, jk, imax 691 INTEGER :: ind1 700 692 REAL(wp) :: ze2u, ze1v, zua, zva, zbtr, zhtot 701 693 REAL(wp), DIMENSION(i1:i2,j1:j2,1:jpk) :: vbdiff … … 759 751 zhtot = zhtot + h_in(jk) 760 752 tabin(jk) = tabres(ji,jj,jk,m1) 761 END DO753 END DO 762 754 ! 763 755 N_out = 0 … … 766 758 N_out = N_out + 1 767 759 h_out(N_out) = e3v(ji,jj,jk,Kbb_a) 768 END DO760 END DO 769 761 770 762 ! Account for small differences in free-surface … … 778 770 CALL reconstructandremap(tabin(1:N_in),h_in(1:N_in),tabres_child(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out,1) 779 771 ENDIF 780 END DO781 END DO772 END DO 773 END DO 782 774 783 775 vbdiff(i1:i2,j1:j2,:) = (vv(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:))*vmask(i1:i2,j1:j2,:) … … 812 804 813 805 imax = i2 - 1 814 ! IF(lk_east) imax = MIN(imax,nlci-nbghostcells-2) ! East 815 IF ((nbondi == 1).OR.(nbondi == 2)) imax = MIN(imax,nlci-nbghostcells-2) ! East 816 806 ind1 = jpiglo - ( nn_hls + nbghostcells + 2 ) ! East 807 DO ji = mi0(ind1), mi1(ind1) 808 imax = MIN(imax,ji) 809 END DO 810 817 811 DO jj = j1+1, j2 818 812 DO ji = i1+1, imax ! vector opt. -
NEMO/trunk/src/NST/agrif_oce_update.F90
r13216 r13286 85 85 86 86 Agrif_UseSpecialValueInUpdate = .FALSE. 87 Agrif_SpecialValueFineGrid = 0.87 Agrif_SpecialValueFineGrid = 0._wp 88 88 89 89 use_sign_north = .TRUE. 90 sign_north = -1.90 sign_north = -1._wp 91 91 92 92 ! … … 144 144 ! 145 145 Agrif_UseSpecialValueInUpdate = .TRUE. 146 Agrif_SpecialValueFineGrid = 0. 146 Agrif_SpecialValueFineGrid = 0._wp 147 147 # if ! defined DECAL_FEEDBACK_2D 148 148 CALL Agrif_Update_Variable(sshn_id,procname = updateSSH) … … 156 156 IF ( ln_dynspg_ts.AND.ln_bt_fw ) THEN 157 157 use_sign_north = .TRUE. 158 sign_north = -1. 158 sign_north = -1._wp 159 159 ! Refluxing on ssh: 160 160 # if defined DECAL_FEEDBACK_2D -
NEMO/trunk/src/NST/agrif_user.F90
r13226 r13286 11 11 END SUBROUTINE agrif_user 12 12 13 13 14 SUBROUTINE agrif_before_regridding 14 15 END SUBROUTINE agrif_before_regridding 15 16 17 16 18 SUBROUTINE Agrif_InitWorkspace 17 19 END SUBROUTINE Agrif_InitWorkspace 18 20 21 19 22 SUBROUTINE Agrif_InitValues 20 23 !!---------------------------------------------------------------------- … … 38 41 END SUBROUTINE Agrif_initvalues 39 42 40 SUBROUTINE agrif_istate( Kbb, Kmm, Kaa ) 41 42 USE domvvl 43 USE domain 44 USE par_oce 45 USE agrif_oce 46 USE agrif_oce_interp 47 USE oce 48 USE lib_mpp 49 USe lbclnk 50 43 44 SUBROUTINE Agrif_Istate( Kbb, Kmm, Kaa ) 45 !!---------------------------------------------------------------------- 46 !! *** ROUTINE agrif_istate *** 47 !!---------------------------------------------------------------------- 48 USE domvvl 49 USE domain 50 USE par_oce 51 USE agrif_oce 52 USE agrif_oce_interp 53 USE oce 54 USE lib_mpp 55 USE lbclnk 56 ! 57 IMPLICIT NONE 58 ! 51 59 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 52 60 INTEGER :: jn 53 61 !!---------------------------------------------------------------------- 54 62 IF(lwp) WRITE(numout,*) ' ' 55 63 IF(lwp) WRITE(numout,*) 'AGRIF: interp child initial state from parent' 56 64 IF(lwp) WRITE(numout,*) ' ' 57 65 58 l_ini_child = .TRUE.59 Agrif_SpecialValue = 0. _wp66 l_ini_child = .TRUE. 67 Agrif_SpecialValue = 0.0_wp 60 68 Agrif_UseSpecialValue = .TRUE. 61 uu(:,:,:,:) = 0. ; vv(:,:,:,:) = 0. ; ts(:,:,:,:,:) = 0.69 uu(:,:,:,:) = 0.0_wp ; vv(:,:,:,:) = 0.0_wp ; ts(:,:,:,:,:) = 0.0_wp 62 70 63 Krhs_a = Kbb ;Kmm_a = Kbb71 Krhs_a = Kbb ; Kmm_a = Kbb 64 72 65 73 ! Brutal fix to pas 1x1 refinment. … … 79 87 use_sign_north = .FALSE. 80 88 81 Agrif_UseSpecialValue = .FALSE. !82 l_ini_child = .FALSE.83 84 Krhs_a = Kaa ;Kmm_a = Kmm89 Agrif_UseSpecialValue = .FALSE. 90 l_ini_child = .FALSE. 91 92 Krhs_a = Kaa ; Kmm_a = Kmm 85 93 86 94 DO jn = 1, jpts 87 95 ts(:,:,:,jn,Kbb) = ts(:,:,:,jn,Kbb)*tmask(:,:,:) 88 96 END DO 89 uu(:,:,:,Kbb) = uu(:,:,:,Kbb) * umask(:,:,:) 90 vv(:,:,:,Kbb) = vv(:,:,:,Kbb) * vmask(:,:,:) 91 92 93 CALL lbc_lnk_multi( 'agrif_istate', uu(:,:,:,Kbb), 'U', -1. , vv(:,:,:,Kbb), 'V', -1. ) 94 CALL lbc_lnk( 'agrif_istate', ts(:,:,:,:,Kbb), 'T', 1. ) 95 96 END SUBROUTINE agrif_istate 97 97 uu(:,:,:,Kbb) = uu(:,:,:,Kbb) * umask(:,:,:) 98 vv(:,:,:,Kbb) = vv(:,:,:,Kbb) * vmask(:,:,:) 99 100 101 CALL lbc_lnk_multi( 'agrif_istate', uu(:,:,: ,Kbb), 'U', -1.0_wp , vv(:,:,:,Kbb), 'V', -1.0_wp ) 102 CALL lbc_lnk( 'agrif_istate', ts(:,:,:,:,Kbb), 'T', 1.0_wp ) 103 104 END SUBROUTINE Agrif_Istate 105 106 98 107 SUBROUTINE agrif_declare_var_ini 99 108 !!---------------------------------------------------------------------- 100 !! *** ROUTINE agrif_declare_var ***109 !! *** ROUTINE agrif_declare_var_ini *** 101 110 !!---------------------------------------------------------------------- 102 111 USE agrif_util … … 110 119 ! 111 120 INTEGER :: ind1, ind2, ind3 121 INTEGER :: its 112 122 External :: nemo_mapping 113 123 !!---------------------------------------------------------------------- … … 126 136 ! 1. Declaration of the type of variable which have to be interpolated 127 137 !--------------------------------------------------------------------- 128 ind1 = nbghostcells 129 ind2 = 2 + nbghostcells_x 130 ind3 = 2 + nbghostcells_y_s 131 132 CALL agrif_declare_variable((/2,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),e3t_id) 133 CALL agrif_declare_variable((/2,2/) ,(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),mbkt_id) 134 CALL agrif_declare_variable((/2,2/) ,(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ht0_id) 135 136 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e1u_id) 137 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e2v_id) 138 138 ind1 = nbghostcells 139 ind2 = nn_hls + 2 + nbghostcells_x 140 ind3 = nn_hls + 2 + nbghostcells_y_s 141 142 CALL agrif_declare_variable((/2,2,0 /),(/ind2 ,ind3,0 /),(/'x','y','N' /),(/1,1,1 /),(/jpi,jpj,jpk /), e3t_id) 143 CALL agrif_declare_variable((/2,2 /),(/ind2 ,ind3 /),(/'x','y' /),(/1,1 /),(/jpi,jpj /), mbkt_id) 144 CALL agrif_declare_variable((/2,2 /),(/ind2 ,ind3 /),(/'x','y' /),(/1,1 /),(/jpi,jpj /), ht0_id) 145 146 CALL agrif_declare_variable((/1,2 /),(/ind2-1,ind3 /),(/'x','y' /),(/1,1 /),(/jpi,jpj /), e1u_id) 147 CALL agrif_declare_variable((/2,1 /),(/ind2 ,ind3-1 /),(/'x','y' /),(/1,1 /),(/jpi,jpj /), e2v_id) 139 148 140 149 ! Initial or restart velues 141 142 CALL agrif_declare_variable((/2,2,0,0/),(/ind2 ,ind3 ,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts+1/),tsini_id)143 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3 ,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/) ,uini_id)144 CALL agrif_declare_variable((/2,1,0,0/),(/ind2 ,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/) ,vini_id)145 CALL agrif_declare_variable((/2,2 /) ,(/ind2,ind3/) ,(/'x','y'/),(/1,1/),(/nlci,nlcj/),sshini_id)150 its = jpts+1 151 CALL agrif_declare_variable((/2,2,0,0/),(/ind2 ,ind3 ,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,its/), tsini_id) 152 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3 ,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2 /), uini_id) 153 CALL agrif_declare_variable((/2,1,0,0/),(/ind2 ,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2 /), vini_id) 154 CALL agrif_declare_variable((/2,2 /),(/ind2 ,ind3 /),(/'x','y' /),(/1,1 /),(/jpi,jpj /),sshini_id) 146 155 ! 147 156 148 157 ! 2. Type of interpolation 149 158 !------------------------- 150 CALL Agrif_Set_bcinterp( e3t_id,interp=AGRIF_constant)151 152 CALL Agrif_Set_bcinterp( mbkt_id,interp=AGRIF_constant)153 CALL Agrif_Set_interp ( mbkt_id,interp=AGRIF_constant)154 CALL Agrif_Set_bcinterp( ht0_id ,interp=AGRIF_constant)155 CALL Agrif_Set_interp ( ht0_id ,interp=AGRIF_constant)156 157 CALL Agrif_Set_bcinterp( e1u_id,interp1=Agrif_linear, interp2=AGRIF_ppm )158 CALL Agrif_Set_bcinterp( e2v_id,interp1=AGRIF_ppm , interp2=Agrif_linear )159 CALL Agrif_Set_bcinterp( e3t_id,interp =AGRIF_constant) 160 161 CALL Agrif_Set_bcinterp( mbkt_id,interp =AGRIF_constant) 162 CALL Agrif_Set_interp ( mbkt_id,interp =AGRIF_constant) 163 CALL Agrif_Set_bcinterp( ht0_id,interp =AGRIF_constant) 164 CALL Agrif_Set_interp ( ht0_id,interp =AGRIF_constant) 165 166 CALL Agrif_Set_bcinterp( e1u_id,interp1=Agrif_linear, interp2=AGRIF_ppm ) 167 CALL Agrif_Set_bcinterp( e2v_id,interp1=AGRIF_ppm , interp2=Agrif_linear ) 159 168 160 169 ! Initial fields 161 CALL Agrif_Set_bcinterp( tsini_id ,interp=AGRIF_linear)162 CALL Agrif_Set_interp ( tsini_id ,interp=AGRIF_linear)163 CALL Agrif_Set_bcinterp( uini_id ,interp=AGRIF_linear)164 CALL Agrif_Set_interp ( uini_id ,interp=AGRIF_linear)165 CALL Agrif_Set_bcinterp( vini_id ,interp=AGRIF_linear)166 CALL Agrif_Set_interp ( vini_id ,interp=AGRIF_linear)167 CALL Agrif_Set_bcinterp(sshini_id,interp =AGRIF_linear)168 CALL Agrif_Set_interp (sshini_id,interp =AGRIF_linear)170 CALL Agrif_Set_bcinterp( tsini_id,interp =AGRIF_linear ) 171 CALL Agrif_Set_interp ( tsini_id,interp =AGRIF_linear ) 172 CALL Agrif_Set_bcinterp( uini_id,interp =AGRIF_linear ) 173 CALL Agrif_Set_interp ( uini_id,interp =AGRIF_linear ) 174 CALL Agrif_Set_bcinterp( vini_id,interp =AGRIF_linear ) 175 CALL Agrif_Set_interp ( vini_id,interp =AGRIF_linear ) 176 CALL Agrif_Set_bcinterp(sshini_id,interp =AGRIF_linear ) 177 CALL Agrif_Set_interp (sshini_id,interp =AGRIF_linear ) 169 178 170 179 ! 3. Location of interpolation … … 172 181 ! CALL Agrif_Set_bc( e3t_id, (/-nn_sponge_len*Agrif_irhox(),ind1-1/) ) 173 182 ! JC: check near the boundary only until matching in sponge has been sorted out: 174 CALL Agrif_Set_bc( e3t_id, (/0,ind1-1/) )183 CALL Agrif_Set_bc( e3t_id, (/0,ind1-1/) ) 175 184 176 185 ! extend the interpolation zone by 1 more point than necessary: 177 186 ! RB check here 178 CALL Agrif_Set_bc( mbkt_id, (/-nn_sponge_len*Agrif_irhox()-2,ind1/) )179 CALL Agrif_Set_bc( ht0_id,(/-nn_sponge_len*Agrif_irhox()-2,ind1/) )187 CALL Agrif_Set_bc( mbkt_id, (/-nn_sponge_len*Agrif_irhox()-2,ind1/) ) 188 CALL Agrif_Set_bc( ht0_id, (/-nn_sponge_len*Agrif_irhox()-2,ind1/) ) 180 189 181 CALL Agrif_Set_bc( e1u_id,(/0,ind1-1/))182 CALL Agrif_Set_bc( e2v_id,(/0,ind1-1/))183 184 CALL Agrif_Set_bc( tsini_id, (/0,ind1-1/) ) ! if west, rhox=3 and nbghost=3: columns 2 to 4185 CALL Agrif_Set_bc( uini_id, (/0,ind1-1/) )186 CALL Agrif_Set_bc( vini_id, (/0,ind1-1/) )190 CALL Agrif_Set_bc( e1u_id, (/0,ind1-1/) ) 191 CALL Agrif_Set_bc( e2v_id, (/0,ind1-1/) ) 192 193 CALL Agrif_Set_bc( tsini_id, (/0,ind1-1/) ) ! if west, rhox=3 and nbghost=3: columns 2 to 4 194 CALL Agrif_Set_bc( uini_id, (/0,ind1-1/) ) 195 CALL Agrif_Set_bc( vini_id, (/0,ind1-1/) ) 187 196 CALL Agrif_Set_bc( sshini_id, (/0,ind1-1/) ) 188 197 … … 190 199 !--------------- 191 200 # if defined UPD_HIGH 192 CALL Agrif_Set_Updatetype(e1u_id,update1 = Agrif_Update_Average , update2=Agrif_Update_Full_Weighting)193 CALL Agrif_Set_Updatetype(e2v_id,update1 = Agrif_Update_Full_Weighting, update2=Agrif_Update_Average )201 CALL Agrif_Set_Updatetype(e1u_id,update1 = Agrif_Update_Average , update2=Agrif_Update_Full_Weighting) 202 CALL Agrif_Set_Updatetype(e2v_id,update1 = Agrif_Update_Full_Weighting, update2=Agrif_Update_Average ) 194 203 #else 195 CALL Agrif_Set_Updatetype(e1u_id,update1 = Agrif_Update_Copy , update2=Agrif_Update_Average)196 CALL Agrif_Set_Updatetype(e2v_id,update1 = Agrif_Update_Average , update2=Agrif_Update_Copy)204 CALL Agrif_Set_Updatetype(e1u_id,update1 = Agrif_Update_Copy , update2=Agrif_Update_Average ) 205 CALL Agrif_Set_Updatetype(e2v_id,update1 = Agrif_Update_Average , update2=Agrif_Update_Copy ) 197 206 #endif 198 207 … … 204 213 SUBROUTINE Agrif_Init_Domain( Kbb, Kmm, Kaa ) 205 214 !!---------------------------------------------------------------------- 206 !! *** ROUTINE Agrif_InitValues_cont_dom *** 207 !!---------------------------------------------------------------------- 208 209 !!---------------------------------------------------------------------- 210 !! *** ROUTINE Agrif_InitValues_cont *** 211 !! 212 !! ** Purpose :: Declaration of variables to be interpolated 213 !!---------------------------------------------------------------------- 215 !! *** ROUTINE Agrif_Init_Domain *** 216 !!---------------------------------------------------------------------- 214 217 USE agrif_oce_update 215 218 USE agrif_oce_interp … … 243 246 ! on the child grid 244 247 Agrif_UseSpecialValue = .FALSE. 245 ht0_parent( :,:) = 0._wp248 ht0_parent( :,:) = 0._wp 246 249 mbkt_parent(:,:) = 0 247 250 ! … … 255 258 ! and no refinement 256 259 DO_2D_10_10 257 mbku_parent(ji,jj) = MIN( mbkt_parent(ji+1,jj ) , mbkt_parent(ji,jj))258 mbkv_parent(ji,jj) = MIN( mbkt_parent(ji ,jj+1) , mbkt_parent(ji,jj))260 mbku_parent(ji,jj) = MIN( mbkt_parent(ji+1,jj ), mbkt_parent(ji,jj) ) 261 mbkv_parent(ji,jj) = MIN( mbkt_parent(ji ,jj+1), mbkt_parent(ji,jj) ) 259 262 END_2D 260 263 IF ( ln_sco.AND.Agrif_Parent(ln_sco) ) THEN … … 265 268 ELSE 266 269 DO_2D_10_10 267 hu0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji+1,jj) )268 hv0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji,jj+1) )270 hu0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji+1,jj) ) 271 hv0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji,jj+1) ) 269 272 END_2D 270 271 ENDIF 272 ! 273 CALL lbc_lnk( 'Agrif_Init_Domain', hu0_parent, 'U', 1.0_wp ) 274 CALL lbc_lnk( 'Agrif_Init_Domain', hv0_parent, 'V', 1.0_wp ) 275 zk(:,:) = REAL( mbku_parent(:,:), wp ) ; CALL lbc_lnk('Agrif_InitValues_cont', zk, 'U', 1.0_wp ) 276 mbku_parent(:,:) = MAX( NINT( zk(:,:) ), 1 ) ; 277 zk(:,:) = REAL( mbkv_parent(:,:), wp ) ; CALL lbc_lnk( 'Agrif_InitValues_cont', zk, 'V', 1.0_wp ) 273 ENDIF 274 ! 275 CALL lbc_lnk_multi( 'Agrif_Init_Domain', hu0_parent, 'U', 1.0_wp, hv0_parent, 'V', 1.0_wp ) 276 DO_2D_00_00 277 zk(ji,jj) = REAL( mbku_parent(ji,jj), wp ) 278 END_2D 279 CALL lbc_lnk( 'Agrif_InitValues_cont', zk, 'U', 1.0_wp ) 280 mbku_parent(:,:) = MAX( NINT( zk(:,:) ), 1 ) 281 DO_2D_00_00 282 zk(ji,jj) = REAL( mbkv_parent(ji,jj), wp ) 283 END_2D 284 CALL lbc_lnk( 'Agrif_InitValues_cont', zk, 'V', 1.0_wp ) 278 285 mbkv_parent(:,:) = MAX( NINT( zk(:,:) ), 1 ) 279 286 … … 333 340 334 341 SUBROUTINE Agrif_InitValues_cont 335 336 337 338 339 342 !!---------------------------------------------------------------------- 343 !! *** ROUTINE Agrif_InitValues_cont *** 344 !! 345 !! ** Purpose :: Declaration of variables to be interpolated 346 !!---------------------------------------------------------------------- 340 347 USE agrif_oce_update 341 348 USE agrif_oce_interp … … 367 374 Agrif_SpecialValue = 0._wp 368 375 Agrif_UseSpecialValue = .TRUE. 369 CALL Agrif_Bc_variable( tsn_id,calledweight=1.,procname=interptsn)376 CALL Agrif_Bc_variable( tsn_id,calledweight=1.,procname=interptsn) 370 377 CALL Agrif_Sponge 371 378 tabspongedone_tsn = .FALSE. … … 398 405 use_sign_north = .TRUE. 399 406 sign_north = -1. 400 CALL Agrif_Bc_variable( unb_id,calledweight=1.,procname=interpunb)401 CALL Agrif_Bc_variable( vnb_id,calledweight=1.,procname=interpvnb)407 CALL Agrif_Bc_variable( unb_id,calledweight=1.,procname=interpunb ) 408 CALL Agrif_Bc_variable( vnb_id,calledweight=1.,procname=interpvnb ) 402 409 CALL Agrif_Bc_variable(ub2b_interp_id,calledweight=1.,procname=interpub2b) 403 410 CALL Agrif_Bc_variable(vb2b_interp_id,calledweight=1.,procname=interpvb2b) … … 460 467 ! 1. Declaration of the type of variable which have to be interpolated 461 468 !--------------------------------------------------------------------- 462 463 ind1 = nbghostcells 464 ind2 = 2 + nbghostcells_x 465 ind3 = 2 + nbghostcells_y_s 466 469 ind1 = nbghostcells 470 ind2 = nn_hls + 2 + nbghostcells_x 471 ind3 = nn_hls + 2 + nbghostcells_y_s 467 472 # if defined key_vertical 468 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts+1/),tsn_id)469 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts+1/),tsn_sponge_id)470 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_interp_id)471 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_interp_id)472 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_update_id)473 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_update_id)474 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_sponge_id)475 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_sponge_id)473 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_id) 474 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_sponge_id) 475 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_interp_id) 476 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_interp_id) 477 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_update_id) 478 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_update_id) 479 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_sponge_id) 480 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_sponge_id) 476 481 # else 477 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts/),tsn_id)478 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts/),tsn_sponge_id)479 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_interp_id)480 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_interp_id)481 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_update_id)482 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_update_id)483 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_sponge_id)484 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_sponge_id)482 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsn_id) 483 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsn_sponge_id) 484 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_interp_id) 485 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_interp_id) 486 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_update_id) 487 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_update_id) 488 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_sponge_id) 489 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_sponge_id) 485 490 # endif 486 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),unb_id) 487 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vnb_id) 488 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_interp_id) 489 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_interp_id) 490 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_update_id) 491 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_update_id) 492 493 CALL agrif_declare_variable((/2,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),sshn_id) 491 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),unb_id) 492 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vnb_id) 493 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),ub2b_interp_id) 494 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vb2b_interp_id) 495 CALL agrif_declare_variable((/1,2/),(/ind2-1,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),ub2b_update_id) 496 CALL agrif_declare_variable((/2,1/),(/ind2,ind3-1/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vb2b_update_id) 497 498 ! CALL agrif_declare_variable((/2,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),glamt_id) 499 ! CALL agrif_declare_variable((/2,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),gphit_id) 500 CALL agrif_declare_variable((/2,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),sshn_id) 494 501 495 502 496 503 IF( ln_zdftke.OR.ln_zdfgls ) THEN ! logical not known at this point 497 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpk/), en_id)498 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpk/),avt_id)504 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/), en_id) 505 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avt_id) 499 506 # if defined key_vertical 500 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),avm_id)507 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),avm_id) 501 508 # else 502 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),avm_id)509 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),avm_id) 503 510 # endif 504 511 ENDIF … … 506 513 ! 2. Type of interpolation 507 514 !------------------------- 508 CALL Agrif_Set_bcinterp( tsn_id,interp=AGRIF_linear)509 CALL Agrif_Set_bcinterp( un_interp_id,interp1=Agrif_linear,interp2=AGRIF_ppm)510 CALL Agrif_Set_bcinterp( vn_interp_id,interp1=AGRIF_ppm,interp2=Agrif_linear)511 512 CALL Agrif_Set_bcinterp( tsn_sponge_id,interp=AGRIF_linear)513 CALL Agrif_Set_bcinterp( un_sponge_id,interp1=Agrif_linear,interp2=AGRIF_ppm)514 CALL Agrif_Set_bcinterp( vn_sponge_id,interp1=AGRIF_ppm,interp2=Agrif_linear)515 516 CALL Agrif_Set_bcinterp( sshn_id,interp=AGRIF_linear)517 CALL Agrif_Set_bcinterp( unb_id,interp1=Agrif_linear,interp2=AGRIF_ppm)518 CALL Agrif_Set_bcinterp( vnb_id,interp1=AGRIF_ppm,interp2=Agrif_linear)519 CALL Agrif_Set_bcinterp(ub2b_interp_id,interp1=Agrif_linear,interp2=AGRIF_ppm )520 CALL Agrif_Set_bcinterp(vb2b_interp_id,interp1=AGRIF_ppm ,interp2=Agrif_linear)515 CALL Agrif_Set_bcinterp( tsn_id,interp =AGRIF_linear) 516 CALL Agrif_Set_bcinterp( un_interp_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 517 CALL Agrif_Set_bcinterp( vn_interp_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) 518 519 CALL Agrif_Set_bcinterp( tsn_sponge_id,interp =AGRIF_linear) 520 CALL Agrif_Set_bcinterp( un_sponge_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 521 CALL Agrif_Set_bcinterp( vn_sponge_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) 522 523 CALL Agrif_Set_bcinterp( sshn_id,interp =AGRIF_linear) 524 CALL Agrif_Set_bcinterp( unb_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 525 CALL Agrif_Set_bcinterp( vnb_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) 526 CALL Agrif_Set_bcinterp(ub2b_interp_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 527 CALL Agrif_Set_bcinterp(vb2b_interp_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) 521 528 ! 522 529 ! > Divergence conserving alternative: … … 531 538 532 539 533 ! 3. Location of interpolation 540 ! CALL Agrif_Set_bcinterp(gphit_id,interp=AGRIF_constant) 541 ! CALL Agrif_Set_bcinterp(glamt_id,interp=AGRIF_constant) 542 543 ! 3. Location of interpolation 534 544 !----------------------------- 535 545 CALL Agrif_Set_bc( tsn_id, (/0,ind1-1/) ) ! if west, rhox=3 and nbghost=3: columns 2 to 4 … … 548 558 549 559 IF( ln_zdftke.OR.ln_zdfgls ) CALL Agrif_Set_bc( avm_id, (/0,ind1/) ) 560 !!$ CALL Agrif_Set_bc(glamt_id, (/0,ind1-1/) ) 561 !!$ CALL Agrif_Set_bc(gphit_id, (/0,ind1-1/) ) 550 562 551 563 ! 4. Update type … … 553 565 554 566 # if defined UPD_HIGH 555 CALL Agrif_Set_Updatetype( tsn_id, update= Agrif_Update_Full_Weighting)556 CALL Agrif_Set_Updatetype(un_update_id,update1 = Agrif_Update_Average , update2 = Agrif_Update_Full_Weighting)557 CALL Agrif_Set_Updatetype(vn_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average )558 559 CALL Agrif_Set_Updatetype(ub2b_update_id,update1 = Agrif_Update_Average , update2 = Agrif_Update_Full_Weighting)560 CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average )561 CALL Agrif_Set_Updatetype( sshn_id,update= Agrif_Update_Full_Weighting)562 CALL Agrif_Set_Updatetype( e3t_id, update= Agrif_Update_Full_Weighting)567 CALL Agrif_Set_Updatetype( tsn_id,update = Agrif_Update_Full_Weighting) 568 CALL Agrif_Set_Updatetype(un_update_id,update1 = Agrif_Update_Average , update2 = Agrif_Update_Full_Weighting) 569 CALL Agrif_Set_Updatetype(vn_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average ) 570 571 CALL Agrif_Set_Updatetype(ub2b_update_id,update1 = Agrif_Update_Average , update2 = Agrif_Update_Full_Weighting) 572 CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average ) 573 CALL Agrif_Set_Updatetype( sshn_id,update = Agrif_Update_Full_Weighting) 574 CALL Agrif_Set_Updatetype( e3t_id,update = Agrif_Update_Full_Weighting) 563 575 564 576 ! IF( ln_zdftke.OR.ln_zdfgls ) THEN … … 569 581 570 582 #else 571 CALL Agrif_Set_Updatetype( tsn_id, update= AGRIF_Update_Average)572 CALL Agrif_Set_Updatetype(un_update_id,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average)573 CALL Agrif_Set_Updatetype(vn_update_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy )574 575 CALL Agrif_Set_Updatetype(ub2b_update_id,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average)576 CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy )577 CALL Agrif_Set_Updatetype( sshn_id,update= AGRIF_Update_Average)578 CALL Agrif_Set_Updatetype( e3t_id, update= AGRIF_Update_Average)583 CALL Agrif_Set_Updatetype( tsn_id, update = AGRIF_Update_Average) 584 CALL Agrif_Set_Updatetype(un_update_id,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) 585 CALL Agrif_Set_Updatetype(vn_update_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy ) 586 587 CALL Agrif_Set_Updatetype(ub2b_update_id,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) 588 CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy ) 589 CALL Agrif_Set_Updatetype( sshn_id,update = AGRIF_Update_Average) 590 CALL Agrif_Set_Updatetype( e3t_id,update = AGRIF_Update_Average) 579 591 580 592 ! IF( ln_zdftke.OR.ln_zdfgls ) THEN … … 589 601 590 602 #if defined key_si3 591 SUBROUTINE Agrif_InitValues_cont_ice 603 SUBROUTINE Agrif_InitValues_cont_ice 604 !!---------------------------------------------------------------------- 605 !! *** ROUTINE Agrif_InitValues_cont_ice *** 606 !!---------------------------------------------------------------------- 592 607 USE Agrif_Util 593 608 USE sbc_oce, ONLY : nn_fsbc ! clem: necessary otherwise Agrif_Parent(nn_fsbc) = nn_fsbc … … 597 612 USE agrif_ice_interp 598 613 USE lib_mpp 599 ! !----------------------------------------------------------------------600 !! *** ROUTINE Agrif_InitValues_cont_ice ***601 ! !----------------------------------------------------------------------602 614 ! 615 IMPLICIT NONE 616 ! 617 !!---------------------------------------------------------------------- 603 618 ! Controls 604 619 … … 623 638 END SUBROUTINE Agrif_InitValues_cont_ice 624 639 640 625 641 SUBROUTINE agrif_declare_var_ice 626 642 !!---------------------------------------------------------------------- 627 643 !! *** ROUTINE agrif_declare_var_ice *** 628 644 !!---------------------------------------------------------------------- 629 630 645 USE Agrif_Util 631 646 USE ice … … 635 650 ! 636 651 INTEGER :: ind1, ind2, ind3 637 !!---------------------------------------------------------------------- 652 INTEGER :: ipl 653 !!---------------------------------------------------------------------- 638 654 ! 639 655 ! 1. Declaration of the type of variable which have to be interpolated (parent=>child) … … 644 660 ! 2,2 = two ghost lines 645 661 !------------------------------------------------------------------------------------- 646 647 ind 1 = nbghostcells648 ind 2 = 2 + nbghostcells_x649 i nd3 = 2 + nbghostcells_y_s650 CALL agrif_declare_variable((/2,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpl*(8+nlay_s+nlay_i)/),tra_ice_id)651 CALL agrif_declare_variable((/1,2/) ,(/ind2-1,ind3/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_ice_id)652 CALL agrif_declare_variable((/2,1/) ,(/ind2,ind3-1/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_ice_id)653 654 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpl*(8+nlay_s+nlay_i)/),tra_iceini_id)655 CALL agrif_declare_variable((/1,2/) ,(/ind2-1,ind3/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_iceini_id)656 CALL agrif_declare_variable((/2,1/) ,(/ind2,ind3-1/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_iceini_id)662 ind1 = nbghostcells 663 ind2 = nn_hls + 2 + nbghostcells_x 664 ind3 = nn_hls + 2 + nbghostcells_y_s 665 ipl = jpl*(8+nlay_s+nlay_i) 666 CALL agrif_declare_variable((/2,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,ipl/),tra_ice_id) 667 CALL agrif_declare_variable((/1,2/) ,(/ind2-1,ind3/),(/'x','y' /),(/1,1 /),(/jpi,jpj /), u_ice_id) 668 CALL agrif_declare_variable((/2,1/) ,(/ind2,ind3-1/),(/'x','y' /),(/1,1 /),(/jpi,jpj /), v_ice_id) 669 670 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,ipl/),tra_iceini_id) 671 CALL agrif_declare_variable((/1,2/) ,(/ind2-1,ind3/),(/'x','y' /),(/1,1 /),(/jpi,jpj /), u_iceini_id) 672 CALL agrif_declare_variable((/2,1/) ,(/ind2,ind3-1/),(/'x','y' /),(/1,1 /),(/jpi,jpj /), v_iceini_id) 657 673 658 674 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) … … 712 728 USE agrif_top_interp 713 729 USE agrif_top_sponge 714 !! 715 716 !! 717 IMPLICIT NONE 718 ! 719 CHARACTER(len=10) :: cl_check1, cl_check2, cl_check3 720 LOGICAL :: check_namelist 721 !!---------------------------------------------------------------------- 722 723 724 ! 1. Declaration of the type of variable which have to be interpolated 725 !--------------------------------------------------------------------- 726 CALL agrif_declare_var_top 727 728 ! 2. First interpolations of potentially non zero fields 729 !------------------------------------------------------- 730 Agrif_SpecialValue=0. 731 Agrif_UseSpecialValue = .TRUE. 732 CALL Agrif_Bc_variable(trn_id,calledweight=1.,procname=interptrn) 733 Agrif_UseSpecialValue = .FALSE. 734 CALL Agrif_Sponge 735 tabspongedone_trn = .FALSE. 736 CALL Agrif_Bc_variable(trn_sponge_id,calledweight=1.,procname=interptrn_sponge) 737 ! reset tsa to zero 738 tra(:,:,:,:) = 0. 739 740 ! 3. Some controls 741 !----------------- 742 check_namelist = .TRUE. 743 744 IF( check_namelist ) THEN 745 ! Check time steps 746 IF( NINT(Agrif_Rhot()) * NINT(rdt) .NE. Agrif_Parent(rdt) ) THEN 747 WRITE(cl_check1,*) Agrif_Parent(rdt) 748 WRITE(cl_check2,*) rdt 749 WRITE(cl_check3,*) rdt*Agrif_Rhot() 750 CALL ctl_stop( 'incompatible time step between grids', & 730 ! 731 IMPLICIT NONE 732 ! 733 CHARACTER(len=10) :: cl_check1, cl_check2, cl_check3 734 LOGICAL :: check_namelist 735 !!---------------------------------------------------------------------- 736 737 ! 1. Declaration of the type of variable which have to be interpolated 738 !--------------------------------------------------------------------- 739 CALL agrif_declare_var_top 740 741 ! 2. First interpolations of potentially non zero fields 742 !------------------------------------------------------- 743 Agrif_SpecialValue=0._wp 744 Agrif_UseSpecialValue = .TRUE. 745 CALL Agrif_Bc_variable(trn_id,calledweight=1.,procname=interptrn) 746 Agrif_UseSpecialValue = .FALSE. 747 CALL Agrif_Sponge 748 tabspongedone_trn = .FALSE. 749 CALL Agrif_Bc_variable(trn_sponge_id,calledweight=1.,procname=interptrn_sponge) 750 ! reset tsa to zero 751 tra(:,:,:,:) = 0._wp 752 753 ! 3. Some controls 754 !----------------- 755 check_namelist = .TRUE. 756 757 IF( check_namelist ) THEN 758 ! Check time steps 759 IF( NINT(Agrif_Rhot()) * NINT(rdt) .NE. Agrif_Parent(rdt) ) THEN 760 WRITE(cl_check1,*) Agrif_Parent(rdt) 761 WRITE(cl_check2,*) rdt 762 WRITE(cl_check3,*) rdt*Agrif_Rhot() 763 CALL ctl_stop( 'incompatible time step between grids', & 751 764 & 'parent grid value : '//cl_check1 , & 752 765 & 'child grid value : '//cl_check2 , & 753 766 & 'value on child grid should be changed to & 754 767 & :'//cl_check3 ) 755 ENDIF756 757 ! Check run length758 IF( Agrif_IRhot() * (Agrif_Parent(nitend)- &768 ENDIF 769 770 ! Check run length 771 IF( Agrif_IRhot() * (Agrif_Parent(nitend)- & 759 772 Agrif_Parent(nit000)+1) .NE. (nitend-nit000+1) ) THEN 760 WRITE(cl_check1,*) (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1761 WRITE(cl_check2,*) Agrif_Parent(nitend) *Agrif_IRhot()762 CALL ctl_warn( 'incompatible run length between grids' , &773 WRITE(cl_check1,*) (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1 774 WRITE(cl_check2,*) Agrif_Parent(nitend) *Agrif_IRhot() 775 CALL ctl_warn( 'incompatible run length between grids' , & 763 776 & ' nit000 on fine grid will be change to : '//cl_check1, & 764 777 & ' nitend on fine grid will be change to : '//cl_check2 ) 765 nit000 = (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1766 nitend = Agrif_Parent(nitend) *Agrif_IRhot()767 ENDIF768 ENDIF769 !778 nit000 = (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1 779 nitend = Agrif_Parent(nitend) *Agrif_IRhot() 780 ENDIF 781 ENDIF 782 ! 770 783 END SUBROUTINE Agrif_InitValues_cont_top 771 784 … … 784 797 INTEGER :: ind1, ind2, ind3 785 798 !!---------------------------------------------------------------------- 786 787 788 789 799 !RB_CMEMS : declare here init for top 790 800 ! 1. Declaration of the type of variable which have to be interpolated 791 801 !--------------------------------------------------------------------- 792 ind1 = nbghostcells793 ind2 = 2 + nbghostcells_x794 ind3 = 2 + nbghostcells_y_s802 ind1 = nbghostcells 803 ind2 = nn_hls + 2 + nbghostcells_x 804 ind3 = nn_hls + 2 + nbghostcells_y_s 795 805 # if defined key_vertical 796 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra+1/),trn_id)797 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra+1/),trn_sponge_id)806 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra+1/),trn_id) 807 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra+1/),trn_sponge_id) 798 808 # else 799 809 ! LAURENT: STRANGE why (3,3) here ? 800 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra/),trn_id)801 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra/),trn_sponge_id)810 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) 811 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_sponge_id) 802 812 # endif 803 813 … … 822 832 END SUBROUTINE agrif_declare_var_top 823 833 # endif 834 824 835 825 836 SUBROUTINE Agrif_detect( kg, ksizex ) … … 835 846 END SUBROUTINE Agrif_detect 836 847 848 837 849 SUBROUTINE agrif_nemo_init 838 850 !!---------------------------------------------------------------------- 839 851 !! *** ROUTINE agrif_init *** 840 852 !!---------------------------------------------------------------------- 841 USE agrif_oce842 USE agrif_ice843 USE dom_oce844 USE in_out_manager845 USE lib_mpp846 ! !853 USE agrif_oce 854 USE agrif_ice 855 USE dom_oce 856 USE in_out_manager 857 USE lib_mpp 858 ! 847 859 IMPLICIT NONE 848 860 ! … … 880 892 ! 881 893 ! Set the number of ghost cells according to periodicity 882 nbghostcells_x = nbghostcells894 nbghostcells_x = nbghostcells 883 895 nbghostcells_y_s = nbghostcells 884 896 nbghostcells_y_n = nbghostcells 885 897 ! 886 IF ( jperio == 1 ) nbghostcells_x = 0 887 IF ( .NOT. lk_south ) nbghostcells_y_s = 0 888 898 IF( jperio == 1 ) nbghostcells_x = 0 899 IF( .NOT. lk_south ) nbghostcells_y_s = 0 889 900 ! Some checks 890 IF( jpiglo /= nbcellsx + 2 + 2*n bghostcells_x )&891 CALL ctl_stop( 'STOP', 'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2+ 2*nbghostcells_x' )892 IF( jpjglo /= nbcellsy + 2 + nbghostcells_y_s + nbghostcells_y_n )&893 CALL ctl_stop( 'STOP', 'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + 2+ nbghostcells_y_s + nbghostcells_y_n' )901 IF( jpiglo /= nbcellsx + 2 + 2*nn_hls + nbghostcells_x + nbghostcells_x ) CALL ctl_stop( 'STOP', & 902 & 'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2 + 2*nn_hls + 2*nbghostcells_x' ) 903 IF( jpjglo /= nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n ) CALL ctl_stop( 'STOP', & 904 & 'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n' ) 894 905 IF( ln_use_jattr ) CALL ctl_stop( 'STOP', 'agrif_nemo_init:Agrif children requires ln_use_jattr = .false. ' ) 895 906 ! 896 907 END SUBROUTINE agrif_nemo_init 897 908 909 898 910 # if defined key_mpp_mpi 899 911 SUBROUTINE Agrif_InvLoc( indloc, nprocloc, i, indglob ) … … 909 921 ! 910 922 SELECT CASE( i ) 911 CASE(1) ; indglob = indloc + nimppt(nprocloc+1) - 1 912 CASE(2) ; indglob = indloc + njmppt(nprocloc+1) - 1 913 CASE DEFAULT 914 indglob = indloc 923 CASE(1) ; indglob = mig(indloc) 924 CASE(2) ; indglob = mjg(indloc) 925 CASE DEFAULT ; indglob = indloc 915 926 END SELECT 916 927 ! 917 928 END SUBROUTINE Agrif_InvLoc 918 929 930 919 931 SUBROUTINE Agrif_get_proc_info( imin, imax, jmin, jmax ) 920 932 !!---------------------------------------------------------------------- … … 929 941 !!---------------------------------------------------------------------- 930 942 ! 931 imin = nimppt(Agrif_Procrank+1) ! ?????932 jmin = njmppt(Agrif_Procrank+1) ! ?????933 imax = imin + jpi - 1934 jmax = jmin + jpj - 1943 imin = mig( 1 ) 944 jmin = mjg( 1 ) 945 imax = mig(jpi) 946 jmax = mjg(jpj) 935 947 ! 936 948 END SUBROUTINE Agrif_get_proc_info 937 949 950 938 951 SUBROUTINE Agrif_estimate_parallel_cost(imin, imax,jmin, jmax, nbprocs, grid_cost) 939 952 !!---------------------------------------------------------------------- … … 1130 1143 FUNCTION agrif_external_switch_index(ptx,pty,i1,isens) 1131 1144 1132 USE dom_oce 1133 1134 INTEGER :: ptx, pty, i1, isens 1135 INTEGER :: agrif_external_switch_index 1136 1137 IF( isens == 1 ) THEN 1138 IF( ptx == 2 ) THEN ! T, V points 1139 agrif_external_switch_index = jpiglo-i1+2 1140 ELSE ! U, F points 1141 agrif_external_switch_index = jpiglo-i1+1 1142 ENDIF 1143 ELSE IF( isens ==2 ) THEN 1144 IF ( pty == 2 ) THEN ! T, U points 1145 agrif_external_switch_index = jpjglo-2-(i1 -jpjglo) 1146 ELSE ! V, F points 1147 agrif_external_switch_index = jpjglo-3-(i1 -jpjglo) 1148 ENDIF 1149 ENDIF 1145 USE dom_oce 1146 ! 1147 IMPLICIT NONE 1148 1149 INTEGER :: ptx, pty, i1, isens 1150 INTEGER :: agrif_external_switch_index 1151 !!---------------------------------------------------------------------- 1152 1153 IF( isens == 1 ) THEN 1154 IF( ptx == 2 ) THEN ! T, V points 1155 agrif_external_switch_index = jpiglo-i1+2 1156 ELSE ! U, F points 1157 agrif_external_switch_index = jpiglo-i1+1 1158 ENDIF 1159 ELSE IF( isens ==2 ) THEN 1160 IF ( pty == 2 ) THEN ! T, U points 1161 agrif_external_switch_index = jpjglo-2-(i1 -jpjglo) 1162 ELSE ! V, F points 1163 agrif_external_switch_index = jpjglo-3-(i1 -jpjglo) 1164 ENDIF 1165 ENDIF 1150 1166 1151 1167 END FUNCTION agrif_external_switch_index … … 1155 1171 !! *** ROUTINE Correct_field *** 1156 1172 !!---------------------------------------------------------------------- 1157 1158 USE dom_oce 1159 USE agrif_oce 1160 1161 INTEGER :: i1,i2,j1,j2 1162 REAL(wp), DIMENSION(i1:i2,j1:j2) :: tab2d 1163 1164 INTEGER :: i,j 1165 REAL(wp), DIMENSION(i1:i2,j1:j2) :: tab2dtemp 1166 1167 tab2dtemp = tab2d 1168 1169 IF( .NOT. use_sign_north ) THEN 1170 DO j=j1,j2 1171 DO i=i1,i2 1172 tab2d(i,j)=tab2dtemp(i2-(i-i1),j2-(j-j1)) 1173 USE dom_oce 1174 USE agrif_oce 1175 ! 1176 IMPLICIT NONE 1177 ! 1178 INTEGER :: i1,i2,j1,j2 1179 REAL(wp), DIMENSION(i1:i2,j1:j2) :: tab2d 1180 ! 1181 INTEGER :: i,j 1182 REAL(wp), DIMENSION(i1:i2,j1:j2) :: tab2dtemp 1183 !!---------------------------------------------------------------------- 1184 1185 tab2dtemp = tab2d 1186 1187 IF( .NOT. use_sign_north ) THEN 1188 DO j=j1,j2 1189 DO i=i1,i2 1190 tab2d(i,j)=tab2dtemp(i2-(i-i1),j2-(j-j1)) 1191 END DO 1173 1192 END DO 1174 E ND DO1175 ELSE1176 DO j=j1,j21177 DO i=i1,i21178 tab2d(i,j)=sign_north * tab2dtemp(i2-(i-i1),j2-(j-j1))1193 ELSE 1194 DO j=j1,j2 1195 DO i=i1,i2 1196 tab2d(i,j)=sign_north * tab2dtemp(i2-(i-i1),j2-(j-j1)) 1197 END DO 1179 1198 END DO 1180 END DO 1181 ENDIF 1199 ENDIF 1182 1200 1183 1201 END SUBROUTINE Correct_field -
NEMO/trunk/src/OCE/ASM/asminc.F90
r13237 r13286 360 360 361 361 IF ( ln_trainc ) THEN 362 CALL iom_get( inum, jpdom_auto glo, 'bckint', t_bkginc, 1 )363 CALL iom_get( inum, jpdom_auto glo, 'bckins', s_bkginc, 1 )362 CALL iom_get( inum, jpdom_auto, 'bckint', t_bkginc, 1 ) 363 CALL iom_get( inum, jpdom_auto, 'bckins', s_bkginc, 1 ) 364 364 ! Apply the masks 365 365 t_bkginc(:,:,:) = t_bkginc(:,:,:) * tmask(:,:,:) … … 372 372 373 373 IF ( ln_dyninc ) THEN 374 CALL iom_get( inum, jpdom_auto glo, 'bckinu', u_bkginc, 1 )375 CALL iom_get( inum, jpdom_auto glo, 'bckinv', v_bkginc, 1 )374 CALL iom_get( inum, jpdom_auto, 'bckinu', u_bkginc, 1 ) 375 CALL iom_get( inum, jpdom_auto, 'bckinv', v_bkginc, 1 ) 376 376 ! Apply the masks 377 377 u_bkginc(:,:,:) = u_bkginc(:,:,:) * umask(:,:,:) … … 384 384 385 385 IF ( ln_sshinc ) THEN 386 CALL iom_get( inum, jpdom_auto glo, 'bckineta', ssh_bkginc, 1 )386 CALL iom_get( inum, jpdom_auto, 'bckineta', ssh_bkginc, 1 ) 387 387 ! Apply the masks 388 388 ssh_bkginc(:,:) = ssh_bkginc(:,:) * tmask(:,:,1) … … 393 393 394 394 IF ( ln_seaiceinc ) THEN 395 CALL iom_get( inum, jpdom_auto glo, 'bckinseaice', seaice_bkginc, 1 )395 CALL iom_get( inum, jpdom_auto, 'bckinseaice', seaice_bkginc, 1 ) 396 396 ! Apply the masks 397 397 seaice_bkginc(:,:) = seaice_bkginc(:,:) * tmask(:,:,1) … … 467 467 ! 468 468 IF ( ln_trainc ) THEN 469 CALL iom_get( inum, jpdom_auto glo, 'tn', t_bkg )470 CALL iom_get( inum, jpdom_auto glo, 'sn', s_bkg )469 CALL iom_get( inum, jpdom_auto, 'tn', t_bkg ) 470 CALL iom_get( inum, jpdom_auto, 'sn', s_bkg ) 471 471 t_bkg(:,:,:) = t_bkg(:,:,:) * tmask(:,:,:) 472 472 s_bkg(:,:,:) = s_bkg(:,:,:) * tmask(:,:,:) … … 474 474 ! 475 475 IF ( ln_dyninc ) THEN 476 CALL iom_get( inum, jpdom_auto glo, 'un', u_bkg)477 CALL iom_get( inum, jpdom_auto glo, 'vn', v_bkg)476 CALL iom_get( inum, jpdom_auto, 'un', u_bkg, cd_type = 'U', psgn = 1._wp ) 477 CALL iom_get( inum, jpdom_auto, 'vn', v_bkg, cd_type = 'V', psgn = 1._wp ) 478 478 u_bkg(:,:,:) = u_bkg(:,:,:) * umask(:,:,:) 479 479 v_bkg(:,:,:) = v_bkg(:,:,:) * vmask(:,:,:) … … 481 481 ! 482 482 IF ( ln_sshinc ) THEN 483 CALL iom_get( inum, jpdom_auto glo, 'sshn', ssh_bkg )483 CALL iom_get( inum, jpdom_auto, 'sshn', ssh_bkg ) 484 484 ssh_bkg(:,:) = ssh_bkg(:,:) * tmask(:,:,1) 485 485 ENDIF -
NEMO/trunk/src/OCE/BDY/bdyini.F90
r13226 r13286 416 416 CALL iom_get( inum, jpdom_unknown, 'nbi'//cgrid(igrd), zz_read(1:nblendta(igrd,ib_bdy),:) ) 417 417 DO ii = 1,nblendta(igrd,ib_bdy) 418 nbidta(ii,igrd,ib_bdy) = NINT( zz_read(ii,1) ) 418 nbidta(ii,igrd,ib_bdy) = NINT( zz_read(ii,1) ) + nn_hls 419 419 END DO 420 420 CALL iom_get( inum, jpdom_unknown, 'nbj'//cgrid(igrd), zz_read(1:nblendta(igrd,ib_bdy),:) ) 421 421 DO ii = 1,nblendta(igrd,ib_bdy) 422 nbjdta(ii,igrd,ib_bdy) = NINT( zz_read(ii,1) ) 422 nbjdta(ii,igrd,ib_bdy) = NINT( zz_read(ii,1) ) + nn_hls 423 423 END DO 424 424 CALL iom_get( inum, jpdom_unknown, 'nbr'//cgrid(igrd), zz_read(1:nblendta(igrd,ib_bdy),:) ) … … 1378 1378 DO ji = 1, jpi 1379 1379 DO jj = 1, jpj 1380 IF (((ji + nimpp - 1) == jpiwob(ib)).AND. & 1381 & ((jj + njmpp - 1) == jpjwdt(ib))) ztestmask(1)=tmask(ji,jj,1) 1382 IF (((ji + nimpp - 1) == jpiwob(ib)).AND. & 1383 & ((jj + njmpp - 1) == jpjwft(ib))) ztestmask(2)=tmask(ji,jj,1) 1380 IF( mig(ji) == jpiwob(ib) .AND. mjg(jj) == jpjwdt(ib) ) ztestmask(1) = tmask(ji,jj,1) 1381 IF( mig(ji) == jpiwob(ib) .AND. mjg(jj) == jpjwft(ib) ) ztestmask(2) = tmask(ji,jj,1) 1384 1382 END DO 1385 1383 END DO … … 1416 1414 DO ji = 1, jpi 1417 1415 DO jj = 1, jpj 1418 IF (((ji + nimpp - 1) == jpieob(ib)+1).AND. & 1419 & ((jj + njmpp - 1) == jpjedt(ib))) ztestmask(1)=tmask(ji,jj,1) 1420 IF (((ji + nimpp - 1) == jpieob(ib)+1).AND. & 1421 & ((jj + njmpp - 1) == jpjeft(ib))) ztestmask(2)=tmask(ji,jj,1) 1416 IF( mig(ji) == jpieob(ib)+1 .AND. mjg(jj) == jpjedt(ib) ) ztestmask(1) = tmask(ji,jj,1) 1417 IF( mig(ji) == jpieob(ib)+1 .AND. mjg(jj) == jpjeft(ib) ) ztestmask(2) = tmask(ji,jj,1) 1422 1418 END DO 1423 1419 END DO … … 1454 1450 DO ji = 1, jpi 1455 1451 DO jj = 1, jpj 1456 IF (((jj + njmpp - 1) == jpjsob(ib)).AND. & 1457 & ((ji + nimpp - 1) == jpisdt(ib))) ztestmask(1)=tmask(ji,jj,1) 1458 IF (((jj + njmpp - 1) == jpjsob(ib)).AND. & 1459 & ((ji + nimpp - 1) == jpisft(ib))) ztestmask(2)=tmask(ji,jj,1) 1452 IF( mjg(jj) == jpjsob(ib) .AND. mig(ji) == jpisdt(ib) ) ztestmask(1) = tmask(ji,jj,1) 1453 IF( mjg(jj) == jpjsob(ib) .AND. mig(ji) == jpisft(ib) ) ztestmask(2) = tmask(ji,jj,1) 1460 1454 END DO 1461 1455 END DO … … 1478 1472 DO ji = 1, jpi 1479 1473 DO jj = 1, jpj 1480 IF (((jj + njmpp - 1) == jpjnob(ib)+1).AND. & 1481 & ((ji + nimpp - 1) == jpindt(ib))) ztestmask(1)=tmask(ji,jj,1) 1482 IF (((jj + njmpp - 1) == jpjnob(ib)+1).AND. & 1483 & ((ji + nimpp - 1) == jpinft(ib))) ztestmask(2)=tmask(ji,jj,1) 1474 IF( mjg(jj) == jpjnob(ib)+1 .AND. mig(ji) == jpindt(ib) ) ztestmask(1) = tmask(ji,jj,1) 1475 IF( mjg(jj) == jpjnob(ib)+1 .AND. mig(ji) == jpinft(ib) ) ztestmask(2) = tmask(ji,jj,1) 1484 1476 END DO 1485 1477 END DO -
NEMO/trunk/src/OCE/BDY/bdytides.F90
r12921 r13286 167 167 igrd = 1 ! Everything is at T-points here 168 168 DO itide = 1, nb_harmo 169 CALL iom_get( inum, jpdom_auto glo, TRIM(tide_harmonics(itide)%cname_tide)//'_z1', ztr(:,:) )170 CALL iom_get( inum, jpdom_auto glo, TRIM(tide_harmonics(itide)%cname_tide)//'_z2', zti(:,:) )169 CALL iom_get( inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_z1', ztr(:,:) ) 170 CALL iom_get( inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_z2', zti(:,:) ) 171 171 DO ib = 1, SIZE(dta%ssh) 172 172 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) … … 185 185 igrd = 2 ! Everything is at U-points here 186 186 DO itide = 1, nb_harmo 187 CALL iom_get ( inum, jpdom_autoglo, TRIM(tide_harmonics(itide)%cname_tide)//'_u1', ztr(:,:))188 CALL iom_get ( inum, jpdom_autoglo, TRIM(tide_harmonics(itide)%cname_tide)//'_u2', zti(:,:))187 CALL iom_get(inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_u1', ztr(:,:),cd_type='U',psgn=-1._wp) 188 CALL iom_get(inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_u2', zti(:,:),cd_type='U',psgn=-1._wp) 189 189 DO ib = 1, SIZE(dta%u2d) 190 190 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) … … 203 203 igrd = 3 ! Everything is at V-points here 204 204 DO itide = 1, nb_harmo 205 CALL iom_get ( inum, jpdom_autoglo, TRIM(tide_harmonics(itide)%cname_tide)//'_v1', ztr(:,:))206 CALL iom_get ( inum, jpdom_autoglo, TRIM(tide_harmonics(itide)%cname_tide)//'_v2', zti(:,:))205 CALL iom_get(inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_v1', ztr(:,:),cd_type='V',psgn=-1._wp) 206 CALL iom_get(inum, jpdom_auto, TRIM(tide_harmonics(itide)%cname_tide)//'_v2', zti(:,:),cd_type='V',psgn=-1._wp) 207 207 DO ib = 1, SIZE(dta%v2d) 208 208 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) -
NEMO/trunk/src/OCE/C1D/dyndmp.F90
r12377 r13286 121 121 !Read in mask from file 122 122 CALL iom_open ( cn_resto, imask) 123 CALL iom_get ( imask, jpdom_auto glo, 'resto', resto)123 CALL iom_get ( imask, jpdom_auto, 'resto', resto) 124 124 CALL iom_close( imask ) 125 125 ENDIF -
NEMO/trunk/src/OCE/CRS/crs.F90
r10068 r13286 36 36 INTEGER :: jpiglo_full, jpjglo_full !: jpiglo / jpjglo 37 37 INTEGER :: npiglo, npjglo !: jpjglo 38 INTEGER :: nlci_full, nlcj_full !: i-, j-dimension of local or sub domain on parent grid 39 INTEGER :: nldi_full, nldj_full !: starting indices of internal sub-domain on parent grid 40 INTEGER :: nlei_full, nlej_full !: ending indices of internal sub-domain on parent grid 41 INTEGER :: nlci_crs, nlcj_crs !: i-, j-dimension of local or sub domain on coarse grid 42 INTEGER :: nldi_crs, nldj_crs !: starting indices of internal sub-domain on coarse grid 43 INTEGER :: nlei_crs, nlej_crs !: ending indices of internal sub-domain on coarse grid 38 INTEGER :: Nis0_full, Njs0_full !: starting indices of internal sub-domain on parent grid 39 INTEGER :: Nie0_full, Nje0_full !: ending indices of internal sub-domain on parent grid 40 INTEGER :: Nis0_crs , Njs0_crs !: starting indices of internal sub-domain on coarse grid 41 INTEGER :: Nie0_crs , Nje0_crs !: ending indices of internal sub-domain on coarse grid 44 42 45 43 INTEGER :: narea_full, narea_crs !: node … … 48 46 INTEGER :: nimpp_full, njmpp_full !: global position of point (1,1) of subdomain on parent grid 49 47 INTEGER :: nimpp_crs, njmpp_crs !: set to 1,1 for now . Valid only for monoproc 50 INTEGER :: nreci_full, nrecj_full51 INTEGER :: nreci_crs, nrecj_crs52 48 !cc 53 49 INTEGER :: noea_full, nowe_full !: index of the local neighboring processors in … … 76 72 INTEGER, DIMENSION(:), ALLOCATABLE :: mi0_crs, mi1_crs, mj0_crs, mj1_crs 77 73 INTEGER :: mxbinctr, mybinctr ! central point in grid box 78 INTEGER, DIMENSION(:), ALLOCATABLE :: nlcit_crs, nlcit_full!: dimensions of every subdomain79 INTEGER, DIMENSION(:), ALLOCATABLE :: n ldit_crs, nldit_full!: first, last indoor index for each i-domain80 INTEGER, DIMENSION(:), ALLOCATABLE :: n leit_crs, nleit_full!: first, last indoor index for each j-domain81 INTEGER, DIMENSION(:), ALLOCATABLE :: nimppt_crs, nimppt_full!: first, last indoor index for each j-domain82 INTEGER, DIMENSION(:), ALLOCATABLE :: nlcjt_crs, nlcjt_full!: dimensions of every subdomain83 INTEGER, DIMENSION(:), ALLOCATABLE :: n ldjt_crs, nldjt_full!: first, last indoor index for each i-domain84 INTEGER, DIMENSION(:), ALLOCATABLE :: n lejt_crs, nlejt_full!: first, last indoor index for each j-domain85 INTEGER, DIMENSION(:), ALLOCATABLE :: njmppt_crs, njmppt_full!: first, last indoor index for each j-domain74 INTEGER, DIMENSION(:), ALLOCATABLE :: jpiall_crs, jpiall_full !: dimensions of every subdomain 75 INTEGER, DIMENSION(:), ALLOCATABLE :: nis0all_crs, nis0all_full !: first, last indoor index for each i-domain 76 INTEGER, DIMENSION(:), ALLOCATABLE :: nie0all_crs, nie0all_full !: first, last indoor index for each j-domain 77 INTEGER, DIMENSION(:), ALLOCATABLE :: nimppt_crs, nimppt_full !: first, last indoor index for each j-domain 78 INTEGER, DIMENSION(:), ALLOCATABLE :: jpjall_crs, jpjall_full !: dimensions of every subdomain 79 INTEGER, DIMENSION(:), ALLOCATABLE :: njs0all_crs, njs0all_full !: first, last indoor index for each i-domain 80 INTEGER, DIMENSION(:), ALLOCATABLE :: nje0all_crs, nje0all_full !: first, last indoor index for each j-domain 81 INTEGER, DIMENSION(:), ALLOCATABLE :: njmppt_crs, njmppt_full !: first, last indoor index for each j-domain 86 82 87 83 88 84 ! Masks 89 85 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmask_crs, umask_crs, vmask_crs, fmask_crs 90 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: tmask_i_crs, rnfmsk_crs, tpol_crs, fpol_crs 91 92 ! REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmask_i_crs, tpol, fpol 93 86 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: rnfmsk_crs 87 94 88 ! Scale factors 95 89 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1t_crs, e2t_crs, e1e2t_crs ! horizontal scale factors grid type T … … 182 176 & umask_crs(jpi_crs,jpj_crs,jpk) , vmask_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(2)) 183 177 184 ALLOCATE( tmask_i_crs(jpi_crs,jpj_crs) , rnfmsk_crs(jpi_crs,jpj_crs), & 185 & tpol_crs(jpiglo_crs,jpjglo_crs), fpol_crs(jpiglo_crs,jpjglo_crs), STAT=ierr(3) ) 178 ALLOCATE( rnfmsk_crs(jpi_crs,jpj_crs), STAT=ierr(3) ) 186 179 187 180 ALLOCATE( gphit_crs(jpi_crs,jpj_crs) , glamt_crs(jpi_crs,jpj_crs) , & … … 238 231 & hmlp_crs(jpi_crs,jpj_crs) , hmlpt_crs(jpi_crs,jpj_crs) , STAT=ierr(14) ) 239 232 240 ALLOCATE( nimppt_crs (jpnij) , nlcit_crs (jpnij) , nldit_crs (jpnij) , nleit_crs (jpnij), &241 & nimppt_full(jpnij) , nlcit_full(jpnij) , nldit_full(jpnij) , nleit_full(jpnij), &242 njmppt_crs (jpnij) , nlcjt_crs (jpnij) , nldjt_crs (jpnij) , nlejt_crs (jpnij), &243 & njmppt_full(jpnij) , nlcjt_full(jpnij) , nldjt_full(jpnij) , nlejt_full(jpnij) , STAT=ierr(15) )233 ALLOCATE( nimppt_crs (jpnij) , jpiall_crs (jpnij) , nis0all_crs (jpnij) , nie0all_crs (jpnij), & 234 & nimppt_full(jpnij) , jpiall_full(jpnij) , nis0all_full(jpnij) , nie0all_full(jpnij), & 235 njmppt_crs (jpnij) , jpjall_crs (jpnij) , njs0all_crs (jpnij) , nje0all_crs (jpnij), & 236 & njmppt_full(jpnij) , jpjall_full(jpnij) , njs0all_full(jpnij) , nje0all_full(jpnij) , STAT=ierr(15) ) 244 237 245 238 crs_dom_alloc = MAXVAL(ierr) … … 258 251 ierr(:) = 0 259 252 260 ALLOCATE( mjs_crs( nlej_crs) , mje_crs(nlej_crs), mis_crs(nlei_crs) , mie_crs(nlei_crs), STAT=ierr(1) )253 ALLOCATE( mjs_crs(Nje0_crs) , mje_crs(Nje0_crs), mis_crs(Nie0_crs) , mie_crs(Nie0_crs), STAT=ierr(1) ) 261 254 crs_dom_alloc2 = MAXVAL(ierr) 262 255 … … 282 275 jpjglo = jpjglo_full 283 276 284 nlci = nlci_full285 nlcj = nlcj_full286 nldi = nldi_full287 nldj = nldj_full288 nlei = nlei_full289 nlej = nlej_full290 nimpp 291 njmpp 292 293 nlcit(:) = nlcit_full(:)294 n ldit(:) = nldit_full(:)295 n leit(:) = nleit_full(:)296 nimppt (:) = nimppt_full(:)297 nlcjt(:) = nlcjt_full(:)298 n ldjt(:) = nldjt_full(:)299 n lejt(:) = nlejt_full(:)300 njmppt (:) = njmppt_full(:)277 jpi = jpi_full 278 jpj = jpj_full 279 Nis0 = Nis0_full 280 Njs0 = Njs0_full 281 Nie0 = Nie0_full 282 Nje0 = Nje0_full 283 nimpp = nimpp_full 284 njmpp = njmpp_full 285 286 jpiall (:) = jpiall_full (:) 287 nis0all(:) = nis0all_full(:) 288 nie0all(:) = nie0all_full(:) 289 nimppt (:) = nimppt_full (:) 290 jpjall (:) = jpjall_full (:) 291 njs0all(:) = njs0all_full(:) 292 nje0all(:) = nje0all_full(:) 293 njmppt (:) = njmppt_full (:) 301 294 302 295 END SUBROUTINE dom_grid_glo … … 322 315 323 316 324 nlci = nlci_crs325 nlcj = nlcj_crs326 nldi = nldi_crs327 nlei = nlei_crs328 nlej = nlej_crs329 nldj = nldj_crs330 nimpp 331 njmpp 332 333 nlcit(:) = nlcit_crs(:)334 n ldit(:) = nldit_crs(:)335 n leit(:) = nleit_crs(:)336 nimppt (:) = nimppt_crs(:)337 nlcjt(:) = nlcjt_crs(:)338 n ldjt(:) = nldjt_crs(:)339 n lejt(:) = nlejt_crs(:)340 njmppt (:) = njmppt_crs(:)317 jpi = jpi_crs 318 jpj = jpj_crs 319 Nis0 = Nis0_crs 320 Nie0 = Nie0_crs 321 Nje0 = Nje0_crs 322 Njs0 = Njs0_crs 323 nimpp = nimpp_crs 324 njmpp = njmpp_crs 325 326 jpiall (:) = jpiall_crs (:) 327 nis0all(:) = nis0all_crs(:) 328 nie0all(:) = nie0all_crs(:) 329 nimppt (:) = nimppt_crs (:) 330 jpjall (:) = jpjall_crs (:) 331 njs0all(:) = njs0all_crs(:) 332 nje0all(:) = nje0all_crs(:) 333 njmppt (:) = njmppt_crs (:) 341 334 ! 342 335 END SUBROUTINE dom_grid_crs -
NEMO/trunk/src/OCE/CRS/crsdom.F90
r13226 r13286 73 73 74 74 75 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA275 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 76 76 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 77 77 je_2 = mje_crs(2) ; ij = je_2 … … 81 81 ENDIF 82 82 DO jk = 1, jpkm1 83 DO ji = 2, nlei_crs83 DO ji = 2, Nie0_crs 84 84 ijis = mis_crs(ji) ; ijie = mie_crs(ji) 85 85 ! … … 101 101 ! 102 102 DO jk = 1, jpkm1 103 DO ji = 2, nlei_crs103 DO ji = 2, Nie0_crs 104 104 ijis = mis_crs(ji) ; ijie = mie_crs(ji) 105 DO jj = 3, nlej_crs105 DO jj = 3, Nje0_crs 106 106 ijjs = mjs_crs(jj) ; ijje = mje_crs(jj) 107 107 … … 168 168 SELECT CASE ( cd_type ) 169 169 CASE ( 'T' ) 170 DO jj = nldj_crs, nlej_crs170 DO jj = Njs0_crs, Nje0_crs 171 171 ijjs = mjs_crs(jj) + mybinctr 172 DO ji = 2, nlei_crs172 DO ji = 2, Nie0_crs 173 173 ijis = mis_crs(ji) + mxbinctr 174 174 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 177 177 ENDDO 178 178 CASE ( 'U' ) 179 DO jj = nldj_crs, nlej_crs179 DO jj = Njs0_crs, Nje0_crs 180 180 ijjs = mjs_crs(jj) + mybinctr 181 DO ji = 2, nlei_crs181 DO ji = 2, Nie0_crs 182 182 ijis = mis_crs(ji) 183 183 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 186 186 ENDDO 187 187 CASE ( 'V' ) 188 DO jj = nldj_crs, nlej_crs188 DO jj = Njs0_crs, Nje0_crs 189 189 ijjs = mjs_crs(jj) 190 DO ji = 2, nlei_crs190 DO ji = 2, Nie0_crs 191 191 ijis = mis_crs(ji) + mxbinctr 192 192 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 195 195 ENDDO 196 196 CASE ( 'F' ) 197 DO jj = nldj_crs, nlej_crs197 DO jj = Njs0_crs, Nje0_crs 198 198 ijjs = mjs_crs(jj) 199 DO ji = 2, nlei_crs199 DO ji = 2, Nie0_crs 200 200 ijis = mis_crs(ji) 201 201 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 212 212 SELECT CASE ( cd_type ) 213 213 CASE ( 'T', 'V' ) 214 DO ji = 2, nlei_crs214 DO ji = 2, Nie0_crs 215 215 ijis = mis_crs(ji) + mxbinctr 216 216 p_gphi_crs(ji,1) = p_gphi(ijis,1) … … 218 218 ENDDO 219 219 CASE ( 'U', 'F' ) 220 DO ji = 2, nlei_crs220 DO ji = 2, Nie0_crs 221 221 ijis = mis_crs(ji) 222 222 p_gphi_crs(ji,1) = p_gphi(ijis,1) … … 261 261 262 262 DO jk = 1, jpk 263 DO ji = 2, nlei_crs263 DO ji = 2, Nie0_crs 264 264 ijie = mie_crs(ji) 265 DO jj = nldj_crs, nlej_crs265 DO jj = Njs0_crs, Nje0_crs 266 266 ijje = mje_crs(jj) ; ijrs = mje_crs(jj) - mjs_crs(jj) 267 267 ! Only for a factro 3 coarsening … … 374 374 ENDIF 375 375 376 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2376 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 377 377 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 378 378 je_2 = mje_crs(2) … … 512 512 ENDIF 513 513 514 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2514 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 515 515 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 516 516 je_2 = mje_crs(2) … … 617 617 CASE( 'T', 'W' ) 618 618 619 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2619 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 620 620 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 621 621 je_2 = mje_crs(2) … … 674 674 CASE( 'V' ) 675 675 676 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2676 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 677 677 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 678 678 ijje = mje_crs(2) … … 711 711 CASE( 'U' ) 712 712 713 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2713 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 714 714 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 715 715 je_2 = mje_crs(2) … … 782 782 CASE( 'T', 'W' ) 783 783 784 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2784 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 785 785 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 786 786 je_2 = mje_crs(2) … … 842 842 CASE( 'V' ) 843 843 844 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2844 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 845 845 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 846 846 ijje = mje_crs(2) … … 883 883 CASE( 'U' ) 884 884 885 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2885 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 886 886 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 887 887 je_2 = mje_crs(2) … … 953 953 CASE( 'T', 'W' ) 954 954 955 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2955 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 956 956 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 957 957 je_2 = mje_crs(2) … … 1013 1013 CASE( 'V' ) 1014 1014 1015 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21015 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1016 1016 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1017 1017 ijje = mje_crs(2) … … 1053 1053 CASE( 'U' ) 1054 1054 1055 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21055 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1056 1056 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1057 1057 je_2 = mje_crs(2) … … 1158 1158 zsurfmsk(:,:) = p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1) 1159 1159 1160 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21160 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1161 1161 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1162 1162 je_2 = mje_crs(2) … … 1234 1234 CASE( 'T', 'W' ) 1235 1235 1236 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21236 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1237 1237 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1238 1238 je_2 = mje_crs(2) … … 1285 1285 CASE( 'V' ) 1286 1286 1287 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21287 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1288 1288 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1289 1289 ijje = mje_crs(2) … … 1318 1318 CASE( 'U' ) 1319 1319 1320 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21320 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1321 1321 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1322 1322 je_2 = mje_crs(2) … … 1369 1369 CASE( 'T', 'W' ) 1370 1370 1371 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21371 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1372 1372 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1373 1373 je_2 = mje_crs(2) … … 1420 1420 CASE( 'V' ) 1421 1421 1422 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21422 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1423 1423 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1424 1424 ijje = mje_crs(2) … … 1453 1453 CASE( 'U' ) 1454 1454 1455 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21455 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1456 1456 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1457 1457 je_2 = mje_crs(2) … … 1497 1497 CASE( 'T', 'W' ) 1498 1498 1499 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21499 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1500 1500 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1501 1501 je_2 = mje_crs(2) … … 1548 1548 CASE( 'V' ) 1549 1549 1550 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21550 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1551 1551 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1552 1552 ijje = mje_crs(2) … … 1581 1581 CASE( 'U' ) 1582 1582 1583 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21583 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1584 1584 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1585 1585 je_2 = mje_crs(2) … … 1665 1665 ENDDO 1666 1666 1667 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21667 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1668 1668 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1669 1669 je_2 = mje_crs(2) … … 1808 1808 END SELECT 1809 1809 1810 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21810 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1811 1811 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1812 1812 je_2 = mje_crs(2) … … 1899 1899 ! 2.a Define processor domain 1900 1900 IF( .NOT. lk_mpp ) THEN 1901 nimpp_crs = 1 1902 njmpp_crs = 1 1903 nlci_crs = jpi_crs 1904 nlcj_crs = jpj_crs 1905 nldi_crs = 1 1906 nldj_crs = 1 1907 nlei_crs = jpi_crs 1908 nlej_crs = jpj_crs 1901 nimpp_crs = 1 1902 njmpp_crs = 1 1903 Nis0_crs = 1 1904 Njs0_crs = 1 1905 Nie0_crs = jpi_crs 1906 Nje0_crs = jpj_crs 1909 1907 ELSE 1910 1908 ! Initialisation of most local variables - 1911 nimpp_crs = 1 1912 njmpp_crs = 1 1913 nlci_crs = jpi_crs 1914 nlcj_crs = jpj_crs 1915 nldi_crs = 1 1916 nldj_crs = 1 1917 nlei_crs = jpi_crs 1918 nlej_crs = jpj_crs 1909 nimpp_crs = 1 1910 njmpp_crs = 1 1911 Nis0_crs = 1 1912 Njs0_crs = 1 1913 Nie0_crs = jpi_crs 1914 Nje0_crs = jpj_crs 1919 1915 1920 1916 ! Calculs suivant une découpage en j 1921 1917 DO jn = 1, jpnij, jpni 1922 1918 IF( jn < ( jpnij - jpni + 1 ) ) THEN 1923 n lejt_crs(jn) = AINT( REAL( ( jpjglo - (njmppt(jn ) - 1) ) / nn_facty, wp ) ) &1919 nje0all_crs(jn) = AINT( REAL( ( jpjglo - (njmppt(jn ) - 1) ) / nn_facty, wp ) ) & 1924 1920 & - AINT( REAL( ( jpjglo - (njmppt(jn+jpni) - 1) ) / nn_facty, wp ) ) 1925 1921 ELSE 1926 n lejt_crs(jn) = AINT( REAL( nlejt(jn) / nn_facty, wp ) ) + 11922 nje0all_crs(jn) = AINT( REAL( nje0all(jn) / nn_facty, wp ) ) + 1 1927 1923 ENDIF 1928 IF( noso < 0 ) n lejt_crs(jn) = nlejt_crs(jn) + 11924 IF( noso < 0 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1929 1925 SELECT CASE( ibonjt(jn) ) 1930 1926 CASE ( -1 ) 1931 IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 ) n lejt_crs(jn) = nlejt_crs(jn) + 11932 nlcjt_crs(jn) = nlejt_crs(jn) + nn_hls1933 n ldjt_crs(jn) = nldjt(jn)1927 IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1928 jpjall_crs (jn) = nje0all_crs(jn) + nn_hls 1929 njs0all_crs(jn) = njs0all(jn) 1934 1930 1935 1931 CASE ( 0 ) 1936 1932 1937 n ldjt_crs(jn) = nldjt(jn)1938 IF( n ldjt(jn) == 1 ) nlejt_crs(jn) = nlejt_crs(jn) + 11939 n lejt_crs(jn) = nlejt_crs(jn) + nn_hls1940 nlcjt_crs(jn) = nlejt_crs(jn) + nn_hls1933 njs0all_crs(jn) = njs0all(jn) 1934 IF( njs0all(jn) == 1 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1935 nje0all_crs(jn) = nje0all_crs(jn) + nn_hls 1936 jpjall_crs (jn) = nje0all_crs(jn) + nn_hls 1941 1937 1942 1938 CASE ( 1, 2 ) 1943 1939 1944 n lejt_crs(jn) = nlejt_crs(jn) + nn_hls1945 nlcjt_crs(jn) = nlejt_crs(jn)1946 n ldjt_crs(jn) = nldjt(jn)1940 nje0all_crs(jn) = nje0all_crs(jn) + nn_hls 1941 jpjall_crs (jn) = nje0all_crs(jn) 1942 njs0all_crs(jn) = njs0all(jn) 1947 1943 1948 1944 CASE DEFAULT 1949 1945 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (1) ...' ) 1950 1946 END SELECT 1951 IF( nlcjt_crs(jn) > jpj_crs ) jpj_crs = jpj_crs + 11952 1953 IF(n ldjt_crs(jn) == 1 ) THEN1947 IF( jpjall_crs(jn) > jpj_crs ) jpj_crs = jpj_crs + 1 1948 1949 IF(njs0all_crs(jn) == 1 ) THEN 1954 1950 njmppt_crs(jn) = 1 1955 1951 ELSE … … 1958 1954 1959 1955 DO jj = jn + 1, jn + jpni - 1 1960 n lejt_crs(jj) = nlejt_crs(jn)1961 nlcjt_crs(jj) = nlcjt_crs(jn)1962 n ldjt_crs(jj) = nldjt_crs(jn)1963 njmppt_crs (jj)= njmppt_crs(jn)1956 nje0all_crs(jj) = nje0all_crs(jn) 1957 jpjall_crs (jj) = jpjall_crs(jn) 1958 njs0all_crs(jj) = njs0all_crs(jn) 1959 njmppt_crs (jj) = njmppt_crs(jn) 1964 1960 ENDDO 1965 1961 ENDDO 1966 nlej_crs = nlejt_crs(nproc + 1)1967 nlcj_crs = nlcjt_crs(nproc + 1)1968 nldj_crs = nldjt_crs(nproc + 1)1969 njmpp_crs = njmppt_crs (nproc + 1)1962 Nje0_crs = nje0all_crs(nproc + 1) 1963 jpj_crs = jpjall_crs (nproc + 1) 1964 Njs0_crs = njs0all_crs(nproc + 1) 1965 njmpp_crs = njmppt_crs (nproc + 1) 1970 1966 1971 1967 ! Calcul suivant un decoupage en i 1972 1968 DO jn = 1, jpni 1973 1969 IF( jn == 1 ) THEN 1974 n leit_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + nlcit(jn ) ) / nn_factx, wp) )1970 nie0all_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + jpiall(jn ) ) / nn_factx, wp) ) 1975 1971 ELSE 1976 n leit_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + nlcit(jn ) ) / nn_factx, wp) ) &1977 & - AINT( REAL( ( nimppt(jn-1) - 1 + nlcit(jn-1) ) / nn_factx, wp) )1972 nie0all_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + jpiall(jn ) ) / nn_factx, wp) ) & 1973 & - AINT( REAL( ( nimppt(jn-1) - 1 + jpiall(jn-1) ) / nn_factx, wp) ) 1978 1974 ENDIF 1979 1975 1980 1976 SELECT CASE( ibonit(jn) ) 1981 1977 CASE ( -1 ) 1982 n leit_crs(jn) = nleit_crs(jn) + nn_hls1983 nlcit_crs(jn) = nleit_crs(jn) + nn_hls1984 n ldit_crs(jn) = nldit(jn)1978 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1979 jpiall_crs (jn) = nie0all_crs(jn) + nn_hls 1980 nis0all_crs(jn) = nis0all(jn) 1985 1981 1986 1982 CASE ( 0 ) 1987 n leit_crs(jn) = nleit_crs(jn) + nn_hls1988 nlcit_crs(jn) = nleit_crs(jn) + nn_hls1989 n ldit_crs(jn) = nldit(jn)1983 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1984 jpiall_crs (jn) = nie0all_crs(jn) + nn_hls 1985 nis0all_crs(jn) = nis0all(jn) 1990 1986 1991 1987 CASE ( 1, 2 ) 1992 IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 ) n leit_crs(jn) = nleit_crs(jn) + 11993 n leit_crs(jn) = nleit_crs(jn) + nn_hls1994 nlcit_crs(jn) = nleit_crs(jn)1995 n ldit_crs(jn) = nldit(jn)1988 IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 ) nie0all_crs(jn) = nie0all_crs(jn) + 1 1989 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1990 jpiall_crs (jn) = nie0all_crs(jn) 1991 nis0all_crs(jn) = nis0all(jn) 1996 1992 1997 1993 CASE DEFAULT … … 2001 1997 nimppt_crs(jn) = ANINT( REAL( (nimppt(jn) + 1 ) / nn_factx, wp ) ) + 1 2002 1998 DO jj = jn + jpni , jpnij, jpni 2003 n leit_crs(jj) = nleit_crs(jn)2004 nlcit_crs(jj) = nlcit_crs(jn)2005 n ldit_crs(jj) = nldit_crs(jn)2006 nimppt_crs (jj)= nimppt_crs(jn)1999 nie0all_crs(jj) = nie0all_crs(jn) 2000 jpiall_crs (jj) = jpiall_crs (jn) 2001 nis0all_crs(jj) = nis0all_crs(jn) 2002 nimppt_crs (jj) = nimppt_crs (jn) 2007 2003 ENDDO 2008 2004 ENDDO 2009 2005 2010 nlei_crs = nleit_crs(nproc + 1)2011 nlci_crs = nlcit_crs(nproc + 1)2012 nldi_crs = nldit_crs(nproc + 1)2013 nimpp_crs = nimppt_crs (nproc + 1)2006 Nie0_crs = nie0all_crs(nproc + 1) 2007 jpi_crs = jpiall_crs (nproc + 1) 2008 Nis0_crs = nis0all_crs(nproc + 1) 2009 nimpp_crs = nimppt_crs (nproc + 1) 2014 2010 2015 2011 DO ji = 1, jpi_crs … … 2043 2039 jpjglo_full = jpjglo 2044 2040 2045 nlcj_full = nlcj2046 nlci_full = nlci2047 nldi_full = nldi2048 nldj_full = nldj2049 nlei_full = nlei2050 nlej_full = nlej2051 nimpp_full 2052 njmpp_full 2041 jpj_full = jpj 2042 jpi_full = jpi 2043 Nis0_full = Nis0 2044 Njs0_full = Njs0 2045 Nie0_full = Nie0 2046 Nje0_full = Nje0 2047 nimpp_full = nimpp 2048 njmpp_full = njmpp 2053 2049 2054 nlcit_full(:) = nlcit(:)2055 n ldit_full(:) = nldit(:)2056 n leit_full(:) = nleit(:)2057 nimppt_full (:) = nimppt(:)2058 nlcjt_full(:) = nlcjt(:)2059 n ldjt_full(:) = nldjt(:)2060 n lejt_full(:) = nlejt(:)2061 njmppt_full (:) = njmppt(:)2050 jpiall_full (:) = jpiall (:) 2051 nis0all_full(:) = nis0all(:) 2052 nie0all_full(:) = nie0all(:) 2053 nimppt_full (:) = nimppt (:) 2054 jpjall_full (:) = jpjall (:) 2055 njs0all_full(:) = njs0all(:) 2056 nje0all_full(:) = nje0all(:) 2057 njmppt_full (:) = njmppt (:) 2062 2058 2063 2059 CALL dom_grid_crs !swich de grille … … 2073 2069 WRITE(numout,*) 2074 2070 WRITE(numout,*) ' nproc = ' , nproc 2075 WRITE(numout,*) ' nlci = ' , nlci2076 WRITE(numout,*) ' nlcj = ' , nlcj2077 WRITE(numout,*) ' nldi = ' , nldi2078 WRITE(numout,*) ' nldj = ' , nldj2079 WRITE(numout,*) ' nlei = ' , nlei2080 WRITE(numout,*) ' nlej = ' , nlej2081 WRITE(numout,*) ' nlei_full=' , nlei_full2082 WRITE(numout,*) ' nldi_full=' , nldi_full2071 WRITE(numout,*) ' jpi = ' , jpi 2072 WRITE(numout,*) ' jpj = ' , jpj 2073 WRITE(numout,*) ' Nis0 = ' , Nis0 2074 WRITE(numout,*) ' Njs0 = ' , Njs0 2075 WRITE(numout,*) ' Nie0 = ' , Nie0 2076 WRITE(numout,*) ' Nje0 = ' , Nje0 2077 WRITE(numout,*) ' Nie0_full=' , Nie0_full 2078 WRITE(numout,*) ' Nis0_full=' , Nis0_full 2083 2079 WRITE(numout,*) ' nimpp = ' , nimpp 2084 2080 WRITE(numout,*) ' njmpp = ' , njmpp … … 2203 2199 mje_crs(:) = mje2_crs(:) 2204 2200 ELSE 2205 DO jj = 1, nlej_crs2201 DO jj = 1, Nje0_crs 2206 2202 mjs_crs(jj) = mjs2_crs(mjg_crs(jj)) - njmpp + 1 2207 2203 mje_crs(jj) = mje2_crs(mjg_crs(jj)) - njmpp + 1 2208 2204 ENDDO 2209 DO ji = 1, nlei_crs2205 DO ji = 1, Nie0_crs 2210 2206 mis_crs(ji) = mis2_crs(mig_crs(ji)) - nimpp + 1 2211 2207 mie_crs(ji) = mie2_crs(mig_crs(ji)) - nimpp + 1 … … 2213 2209 ENDIF 2214 2210 ! 2215 nistr = mis_crs(2) ; niend = mis_crs( nlci_crs - 1)2216 njstr = mjs_crs(3) ; njend = mjs_crs( nlcj_crs - 1)2211 nistr = mis_crs(2) ; niend = mis_crs(jpi_crs - 1) 2212 njstr = mjs_crs(3) ; njend = mjs_crs(jpj_crs - 1) 2217 2213 ! 2218 2214 END SUBROUTINE crs_dom_def -
NEMO/trunk/src/OCE/CRS/crsdomwri.F90
r13226 r13286 50 50 INTEGER :: ji, jj, jk ! dummy loop indices 51 51 INTEGER :: inum ! local units for 'mesh_mask.nc' file 52 INTEGER :: iif, iil, ijf, ijl53 52 CHARACTER(len=21) :: clnam ! filename (mesh and mask informations) 54 53 ! ! workspace … … 76 75 CALL iom_rstput( 0, 0, inum, 'fmask', fmask_crs, ktype = jp_i1 ) 77 76 78 79 tmask_i_crs(:,:) = tmask_crs(:,:,1) 80 iif = nn_hls 81 iil = nlci_crs - nn_hls + 1 82 ijf = nn_hls 83 ijl = nlcj_crs - nn_hls + 1 84 85 tmask_i_crs( 1:iif , : ) = 0._wp 86 tmask_i_crs(iil:jpi_crs, : ) = 0._wp 87 tmask_i_crs( : , 1:ijf ) = 0._wp 88 tmask_i_crs( : ,ijl:jpj_crs) = 0._wp 89 90 91 tpol_crs(1:jpiglo_crs,:) = 1._wp 92 fpol_crs(1:jpiglo_crs,:) = 1._wp 93 IF( jperio == 3 .OR. jperio == 4 ) THEN 94 tpol_crs(jpiglo_crs/2+1:jpiglo_crs,:) = 0._wp 95 fpol_crs( 1 :jpiglo_crs,:) = 0._wp 96 IF( mjg_crs(nlej_crs) == jpiglo_crs ) THEN 97 DO ji = iif+1, iil-1 98 tmask_i_crs(ji,nlej_crs-1) = tmask_i_crs(ji,nlej_crs-1) & 99 & * tpol_crs(mig_crs(ji),1) 100 ENDDO 101 ENDIF 102 ENDIF 103 IF( jperio == 5 .OR. jperio == 6 ) THEN 104 tpol_crs( 1 :jpiglo_crs,:)=0._wp 105 fpol_crs(jpiglo_crs/2+1:jpiglo_crs,:)=0._wp 106 ENDIF 107 108 CALL iom_rstput( 0, 0, inum, 'tmaskutil', tmask_i_crs, ktype = jp_i1 ) 109 ! ! unique point mask 77 CALL dom_uniq_crs( zprw, 'T' ) 78 zprt = tmask_crs(:,:,1) * zprw 79 CALL iom_rstput( 0, 0, inum, 'tmaskutil', zprt, ktype = jp_i1 ) 110 80 CALL dom_uniq_crs( zprw, 'U' ) 111 81 zprt = umask_crs(:,:,1) * zprw … … 211 181 REAL(wp) :: zshift ! shift value link to the process number 212 182 INTEGER :: ji ! dummy loop indices 213 LOGICAL , DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) :: lldbl! store whether each point is unique or not214 REAL(wp), DIMENSION(jpi_crs,jpj_crs ) ::ztstref183 LOGICAL , DIMENSION(jpi_crs,jpj_crs,1) :: lluniq ! store whether each point is unique or not 184 REAL(wp), DIMENSION(jpi_crs,jpj_crs ) :: ztstref 215 185 !!---------------------------------------------------------------------- 216 186 ! … … 218 188 ! in mpp: make sure that these values are different even between process 219 189 ! -> apply a shift value according to the process number 220 zshift = jpi_crs * jpj_crs * ( narea - 1 )190 zshift = (jpi_crs+1.) * (jpj_crs+1.) * ( narea - 1 ) ! we should use jpimax_crs but not existing 221 191 ztstref(:,:) = RESHAPE( (/ (zshift + REAL(ji,wp), ji = 1, jpi_crs*jpj_crs) /), (/ jpi_crs, jpj_crs /) ) 222 192 ! 223 193 puniq(:,:) = ztstref(:,:) ! default definition 224 194 CALL crs_lbc_lnk( puniq,cdgrd, 1.0_wp ) ! apply boundary conditions 225 lldbl(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed 226 ! 227 puniq(:,:) = 1. ! default definition 228 ! fill only the inner part of the cpu with llbl converted into real 229 puniq(nldi_crs:nlei_crs,nldj_crs:nlej_crs) = REAL( COUNT( lldbl(nldi_crs:nlei_crs,nldj_crs:nlej_crs,:), dim = 3 ) , wp ) 195 lluniq(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed 196 ! 197 puniq(:,:) = REAL( COUNT( lluniq(:,:,:), dim = 3 ), wp ) 230 198 ! 231 199 END SUBROUTINE dom_uniq_crs -
NEMO/trunk/src/OCE/DIA/diaar5.F90
r13237 r13286 396 396 ALLOCATE( zsaldta(jpi,jpj,jpk,jpts) ) 397 397 CALL iom_open ( 'sali_ref_clim_monthly', inum ) 398 CALL iom_get ( inum, jpdom_ data, 'vosaline' , zsaldta(:,:,:,1), 1 )399 CALL iom_get ( inum, jpdom_ data, 'vosaline' , zsaldta(:,:,:,2), 12 )398 CALL iom_get ( inum, jpdom_global, 'vosaline' , zsaldta(:,:,:,1), 1 ) 399 CALL iom_get ( inum, jpdom_global, 'vosaline' , zsaldta(:,:,:,2), 12 ) 400 400 CALL iom_close( inum ) 401 401 -
NEMO/trunk/src/OCE/DIA/diadct.F90
r13237 r13286 412 412 ijloc=ijglo-njmpp+1 ! " 413 413 414 !verify if the point is on the local domain:(1, nlei)*(1,nlej)415 IF( iiloc >= 1 .AND. iiloc <= nlei.AND. &416 ijloc >= 1 .AND. ijloc <= nlej)THEN414 !verify if the point is on the local domain:(1,Nie0)*(1,Nje0) 415 IF( iiloc >= 1 .AND. iiloc <= Nie0 .AND. & 416 ijloc >= 1 .AND. ijloc <= Nje0 )THEN 417 417 iptloc = iptloc + 1 ! count local points 418 418 secs(jsec)%listPoint(iptloc) = POINT_SECTION(mi0(iiglo),mj0(ijglo)) ! store local coordinates … … 519 519 520 520 !which coordinate shall we verify ? 521 IF ( cdind=='I' )THEN ; itest= nlei; iind=1522 ELSE IF ( cdind=='J' )THEN ; itest= nlej; iind=2521 IF ( cdind=='I' )THEN ; itest=Nie0 ; iind=1 522 ELSE IF ( cdind=='J' )THEN ; itest=Nje0 ; iind=2 523 523 ELSE ; CALL ctl_stop("removepoints :Wrong value for cdind") 524 524 ENDIF -
NEMO/trunk/src/OCE/DIA/diahsb.F90
r13237 r13286 274 274 CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 275 275 ENDIF 276 CALL iom_get( numror, jpdom_auto glo, 'surf_ini' , surf_ini , ldxios = lrxios ) ! ice sheet coupling277 CALL iom_get( numror, jpdom_auto glo, 'ssh_ini' , ssh_ini , ldxios = lrxios )278 CALL iom_get( numror, jpdom_auto glo, 'e3t_ini' , e3t_ini , ldxios = lrxios )279 CALL iom_get( numror, jpdom_auto glo, 'tmask_ini' , tmask_ini , ldxios = lrxios )280 CALL iom_get( numror, jpdom_auto glo, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios )281 CALL iom_get( numror, jpdom_auto glo, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios )276 CALL iom_get( numror, jpdom_auto, 'surf_ini' , surf_ini , ldxios = lrxios ) ! ice sheet coupling 277 CALL iom_get( numror, jpdom_auto, 'ssh_ini' , ssh_ini , ldxios = lrxios ) 278 CALL iom_get( numror, jpdom_auto, 'e3t_ini' , e3t_ini , ldxios = lrxios ) 279 CALL iom_get( numror, jpdom_auto, 'tmask_ini' , tmask_ini , ldxios = lrxios ) 280 CALL iom_get( numror, jpdom_auto, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 281 CALL iom_get( numror, jpdom_auto, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) 282 282 IF( ln_linssh ) THEN 283 CALL iom_get( numror, jpdom_auto glo, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lrxios )284 CALL iom_get( numror, jpdom_auto glo, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lrxios )283 CALL iom_get( numror, jpdom_auto, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lrxios ) 284 CALL iom_get( numror, jpdom_auto, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lrxios ) 285 285 ENDIF 286 286 ELSE -
NEMO/trunk/src/OCE/DIA/diaptr.F90
r13237 r13286 355 355 btmsk(:,:,1) = tmask_i(:,:) 356 356 CALL iom_open( 'subbasins', inum, ldstop = .FALSE. ) 357 CALL iom_get( inum, jpdom_ data, 'atlmsk', btmsk(:,:,2) ) ! Atlantic basin358 CALL iom_get( inum, jpdom_ data, 'pacmsk', btmsk(:,:,3) ) ! Pacific basin359 CALL iom_get( inum, jpdom_ data, 'indmsk', btmsk(:,:,4) ) ! Indian basin357 CALL iom_get( inum, jpdom_global, 'atlmsk', btmsk(:,:,2) ) ! Atlantic basin 358 CALL iom_get( inum, jpdom_global, 'pacmsk', btmsk(:,:,3) ) ! Pacific basin 359 CALL iom_get( inum, jpdom_global, 'indmsk', btmsk(:,:,4) ) ! Indian basin 360 360 CALL iom_close( inum ) 361 361 btmsk(:,:,5) = MAX ( btmsk(:,:,3), btmsk(:,:,4) ) ! Indo-Pacific basin -
NEMO/trunk/src/OCE/DIA/diawri.F90
r13237 r13286 471 471 472 472 ! Define indices of the horizontal output zoom and vertical limit storage 473 iimi = 1 ; iima = jpi474 ijmi = 1 ; ijma = jpj473 iimi = Nis0 ; iima = Nie0 474 ijmi = Njs0 ; ijma = Nje0 475 475 ipk = jpk 476 476 IF(ln_abl) ipka = jpkam1 -
NEMO/trunk/src/OCE/DOM/closea.F90
r12377 r13286 22 22 ! 23 23 USE diu_bulk , ONLY: ln_diurnal_only ! used for sanity check 24 USE iom , ONLY: iom_open, iom_get, iom_close, jpdom_ data! I/O routines24 USE iom , ONLY: iom_open, iom_get, iom_close, jpdom_global ! I/O routines 25 25 USE lib_fortran , ONLY: glob_sum ! fortran library 26 26 USE lib_mpp , ONLY: mpp_max, ctl_nam, ctl_stop ! MPP library … … 236 236 ! 237 237 CALL iom_open ( cd_file, ics ) 238 CALL iom_get ( ics, jpdom_ data, TRIM(cd_var), zdta )238 CALL iom_get ( ics, jpdom_global, TRIM(cd_var), zdta ) 239 239 CALL iom_close( ics ) 240 240 k_mskout(:,:) = NINT(zdta(:,:)) -
NEMO/trunk/src/OCE/DOM/daymod.F90
r13226 r13286 279 279 IF(sn_cfctl%l_prtctl) THEN 280 280 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 281 CALL prt_ctl_info( charout)281 CALL prt_ctl_info( charout ) 282 282 ENDIF 283 283 -
NEMO/trunk/src/OCE/DOM/dom_oce.F90
r13237 r13286 76 76 ! !: domain MPP decomposition parameters 77 77 INTEGER , PUBLIC :: nimpp, njmpp !: i- & j-indexes for mpp-subdomain left bottom 78 INTEGER , PUBLIC :: nreci, nrecj !: overlap region in i and j79 78 INTEGER , PUBLIC :: nproc !: number for local processor 80 79 INTEGER , PUBLIC :: narea !: number for local area … … 86 85 87 86 INTEGER, PUBLIC :: npolj !: north fold mark (0, 3 or 4) 88 INTEGER, PUBLIC :: nlci, nldi, nlei !: i-dimensions of the local subdomain and its first and last indoor indices89 INTEGER, PUBLIC :: nlcj, nldj, nlej !: i-dimensions of the local subdomain and its first and last indoor indices90 87 INTEGER, PUBLIC :: noea, nowe !: index of the local neighboring processors in 91 88 INTEGER, PUBLIC :: noso, nono !: east, west, south and north directions 92 89 INTEGER, PUBLIC :: nidom !: ??? 93 90 94 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mig !: local ==> global domain i-index 95 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mjg !: local ==> global domain j-index 96 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mi0, mi1 !: global ==> local domain i-index (mi0=1 and mi1=0 if the global index 97 ! ! is not in the local domain) 98 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mj0, mj1 !: global ==> local domain j-index (mj0=1 and mj1=0 if the global index 99 ! ! is not in the local domain) 100 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nimppt, njmppt !: i-, j-indexes for each processor 101 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ibonit, ibonjt !: i-, j- processor neighbour existence 102 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nlcit , nlcjt !: dimensions of every subdomain 103 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nldit , nldjt !: first, last indoor index for each i-domain 104 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nleit , nlejt !: first, last indoor index for each j-domain 105 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfiimpp, nfipproc, nfilcit 91 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mig !: local ==> global domain, including halos (jpiglo), i-index 92 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mjg !: local ==> global domain, including halos (jpjglo), j-index 93 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mig0 !: local ==> global domain, excluding halos (Ni0glo), i-index 94 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mjg0 !: local ==> global domain, excluding halos (Nj0glo), j-index 95 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mig0_oldcmp !: local ==> global domain, excluding halos (Ni0glo), i-index 96 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mjg0_oldcmp !: local ==> global domain, excluding halos (Nj0glo), j-index 97 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mi0, mi1 !: global, including halos (jpiglo) ==> local domain i-index 98 ! !: (mi0=1 and mi1=0 if global index not in local domain) 99 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mj0, mj1 !: global, including halos (jpjglo) ==> local domain j-index 100 ! !: (mj0=1 and mj1=0 if global index not in local domain) 101 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nimppt, njmppt !: i-, j-indexes for each processor 102 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ibonit, ibonjt !: i-, j- processor neighbour existence 103 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: jpiall, jpjall !: dimensions of all subdomain 104 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nis0all, njs0all !: first, last indoor index for all i-subdomain 105 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nie0all, nje0all !: first, last indoor index for all j-subdomain 106 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nfimpp, nfproc, nfjpi 106 107 107 108 !!---------------------------------------------------------------------- … … 116 117 ! 117 118 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2t , r1_e1e2t !: associated metrics at t-point 118 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2u , r1_e1e2u , e2_e1u!: associated metrics at u-point119 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2v , r1_e1e2v , e1_e2v!: associated metrics at v-point119 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2u , e2_e1u, r1_e1e2u !: associated metrics at u-point 120 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2v , e1_e2v, r1_e1e2v !: associated metrics at v-point 120 121 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2f , r1_e1e2f !: associated metrics at f-point 121 122 ! … … 187 188 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmask_h !: internal domain T-point mask (Figure 8.5 NEMO book) 188 189 189 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF)190 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF) 190 191 191 192 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask, ssfmask !: surface mask at T-,U-, V- and F-pts 192 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: tmask, umask, vmask, fmask !: land/ocean mask at T-, U-, V- and F-pts 193 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wmask, wumask, wvmask !: land/ocean mask at WT-, WU- and WV-pts 194 195 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: tpol, fpol !: north fold mask (jperio= 3 or 4) 193 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: tmask, umask, vmask, wmask, fmask !: land/ocean mask at T-, U-, V-, W- and F-pts 194 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wumask, wvmask !: land/ocean mask at WT-, WU- and WV-pts 196 195 197 196 !!---------------------------------------------------------------------- … … 262 261 ! 263 262 ii = ii+1 264 ALLOCATE( mig(jpi), mjg(jpj), STAT=ierr(ii) ) 265 ! 266 ii = ii+1 267 ALLOCATE( mi0(jpiglo) , mi1 (jpiglo), mj0(jpjglo) , mj1 (jpjglo) , & 268 & tpol(jpiglo) , fpol(jpiglo) , STAT=ierr(ii) ) 263 ALLOCATE( mig(jpi), mjg(jpj), mig0(jpi), mjg0(jpj), mig0_oldcmp(jpi), mjg0_oldcmp(jpj), STAT=ierr(ii) ) 264 ! 265 ii = ii+1 266 ALLOCATE( mi0(jpiglo), mi1(jpiglo), mj0(jpjglo), mj1(jpjglo), STAT=ierr(ii) ) 269 267 ! 270 268 ii = ii+1 -
NEMO/trunk/src/OCE/DOM/domain.F90
r13237 r13286 240 240 !! ** Method : 241 241 !! 242 !! ** Action : - mig , mjg : local domain indices ==> global domain indices 242 !! ** Action : - mig , mjg : local domain indices ==> global domain, including halos, indices 243 !! - mig0, mjg0: local domain indices ==> global domain, excluding halos, indices 243 244 !! - mi0 , mi1 : global domain indices ==> local domain indices 244 !! - mj0 ,, mj1 (global point not in the local domain ==> mi0>mi1 and/or mj0>mj1)245 !! - mj0 , mj1 (if global point not in the local domain ==> mi0>mi1 and/or mj0>mj1) 245 246 !!---------------------------------------------------------------------- 246 247 INTEGER :: ji, jj ! dummy loop argument 247 248 !!---------------------------------------------------------------------- 248 249 ! 249 DO ji = 1, jpi ! local domain indices ==> global domain indices250 DO ji = 1, jpi ! local domain indices ==> global domain, including halos, indices 250 251 mig(ji) = ji + nimpp - 1 251 252 END DO … … 253 254 mjg(jj) = jj + njmpp - 1 254 255 END DO 255 ! ! global domain indices ==> local domain indices 256 ! ! local domain indices ==> global domain, excluding halos, indices 257 ! 258 mig0(:) = mig(:) - nn_hls 259 mjg0(:) = mjg(:) - nn_hls 260 ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data, 261 ! we must define mig0 and mjg0 as bellow. 262 ! Once we decide to forget trunk compatibility, we must simply define mig0 and mjg0 as: 263 mig0_oldcmp(:) = mig0(:) + COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 264 mjg0_oldcmp(:) = mjg0(:) + COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) 265 ! 266 ! ! global domain, including halos, indices ==> local domain indices 256 267 ! ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the 257 268 ! ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. … … 271 282 WRITE(numout,*) ' local domain: jpi = ', jpi , ' jpj = ', jpj , ' jpk = ', jpk 272 283 WRITE(numout,*) 273 WRITE(numout,*) ' conversion from local to global domain indices (and vise versa) done' 274 IF( nn_print >= 1 ) THEN 275 WRITE(numout,*) 276 WRITE(numout,*) ' conversion local ==> global i-index domain (mig)' 277 WRITE(numout,25) (mig(ji),ji = 1,jpi) 278 WRITE(numout,*) 279 WRITE(numout,*) ' conversion global ==> local i-index domain' 280 WRITE(numout,*) ' starting index (mi0)' 281 WRITE(numout,25) (mi0(ji),ji = 1,jpiglo) 282 WRITE(numout,*) ' ending index (mi1)' 283 WRITE(numout,25) (mi1(ji),ji = 1,jpiglo) 284 WRITE(numout,*) 285 WRITE(numout,*) ' conversion local ==> global j-index domain (mjg)' 286 WRITE(numout,25) (mjg(jj),jj = 1,jpj) 287 WRITE(numout,*) 288 WRITE(numout,*) ' conversion global ==> local j-index domain' 289 WRITE(numout,*) ' starting index (mj0)' 290 WRITE(numout,25) (mj0(jj),jj = 1,jpjglo) 291 WRITE(numout,*) ' ending index (mj1)' 292 WRITE(numout,25) (mj1(jj),jj = 1,jpjglo) 293 ENDIF 294 ENDIF 295 25 FORMAT( 100(10x,19i4,/) ) 284 ENDIF 296 285 ! 297 286 END SUBROUTINE dom_glo … … 413 402 #endif 414 403 415 #if defined key_agrif416 404 IF( Agrif_Root() ) THEN 417 #endif 418 IF(lwp) WRITE(numout,*) 419 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 420 CASE ( 1 ) 421 CALL ioconf_calendar('gregorian') 422 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "gregorian", i.e. leap year' 423 CASE ( 0 ) 424 CALL ioconf_calendar('noleap') 425 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "noleap", i.e. no leap year' 426 CASE ( 30 ) 427 CALL ioconf_calendar('360d') 428 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "360d", i.e. 360 days in a year' 429 END SELECT 430 #if defined key_agrif 431 ENDIF 432 #endif 405 IF(lwp) WRITE(numout,*) 406 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 407 CASE ( 1 ) 408 CALL ioconf_calendar('gregorian') 409 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "gregorian", i.e. leap year' 410 CASE ( 0 ) 411 CALL ioconf_calendar('noleap') 412 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "noleap", i.e. no leap year' 413 CASE ( 30 ) 414 CALL ioconf_calendar('360d') 415 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "360d", i.e. 360 days in a year' 416 END SELECT 417 ENDIF 433 418 434 419 READ ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) … … 503 488 !! ** Method : compute and print extrema of masked scale factors 504 489 !!---------------------------------------------------------------------- 505 INTEGER, DIMENSION(2) :: imi1, imi2, ima1, ima2506 INTEGER, DIMENSION(2) :: iloc !507 REAL(wp) ::ze1min, ze1max, ze2min, ze2max490 LOGICAL, DIMENSION(jpi,jpj) :: llmsk 491 INTEGER, DIMENSION(2) :: imil, imip, imi1, imi2, imal, imap, ima1, ima2 492 REAL(wp) :: zglmin, zglmax, zgpmin, zgpmax, ze1min, ze1max, ze2min, ze2max 508 493 !!---------------------------------------------------------------------- 509 494 ! 510 495 IF(lk_mpp) THEN 511 CALL mpp_minloc( 'domain', e1t(:,:), tmask_i(:,:), ze1min, imi1 ) 512 CALL mpp_minloc( 'domain', e2t(:,:), tmask_i(:,:), ze2min, imi2 ) 513 CALL mpp_maxloc( 'domain', e1t(:,:), tmask_i(:,:), ze1max, ima1 ) 514 CALL mpp_maxloc( 'domain', e2t(:,:), tmask_i(:,:), ze2max, ima2 ) 496 CALL mpp_minloc( 'domain', glamt(:,:), tmask_i(:,:), zglmin, imil ) 497 CALL mpp_minloc( 'domain', gphit(:,:), tmask_i(:,:), zgpmin, imip ) 498 CALL mpp_minloc( 'domain', e1t(:,:), tmask_i(:,:), ze1min, imi1 ) 499 CALL mpp_minloc( 'domain', e2t(:,:), tmask_i(:,:), ze2min, imi2 ) 500 CALL mpp_maxloc( 'domain', glamt(:,:), tmask_i(:,:), zglmax, imal ) 501 CALL mpp_maxloc( 'domain', gphit(:,:), tmask_i(:,:), zgpmax, imap ) 502 CALL mpp_maxloc( 'domain', e1t(:,:), tmask_i(:,:), ze1max, ima1 ) 503 CALL mpp_maxloc( 'domain', e2t(:,:), tmask_i(:,:), ze2max, ima2 ) 515 504 ELSE 516 ze1min = MINVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 517 ze2min = MINVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 518 ze1max = MAXVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 519 ze2max = MAXVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 520 ! 521 iloc = MINLOC( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 522 imi1(1) = iloc(1) + nimpp - 1 523 imi1(2) = iloc(2) + njmpp - 1 524 iloc = MINLOC( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 525 imi2(1) = iloc(1) + nimpp - 1 526 imi2(2) = iloc(2) + njmpp - 1 527 iloc = MAXLOC( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 528 ima1(1) = iloc(1) + nimpp - 1 529 ima1(2) = iloc(2) + njmpp - 1 530 iloc = MAXLOC( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 531 ima2(1) = iloc(1) + nimpp - 1 532 ima2(2) = iloc(2) + njmpp - 1 533 ENDIF 505 llmsk = tmask_i(:,:) == 1._wp 506 zglmin = MINVAL( glamt(:,:), mask = llmsk ) 507 zgpmin = MINVAL( gphit(:,:), mask = llmsk ) 508 ze1min = MINVAL( e1t(:,:), mask = llmsk ) 509 ze2min = MINVAL( e2t(:,:), mask = llmsk ) 510 zglmin = MAXVAL( glamt(:,:), mask = llmsk ) 511 zgpmin = MAXVAL( gphit(:,:), mask = llmsk ) 512 ze1max = MAXVAL( e1t(:,:), mask = llmsk ) 513 ze2max = MAXVAL( e2t(:,:), mask = llmsk ) 514 ! 515 imil = MINLOC( glamt(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 516 imip = MINLOC( gphit(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 517 imi1 = MINLOC( e1t(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 518 imi2 = MINLOC( e2t(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 519 imal = MAXLOC( glamt(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 520 imap = MAXLOC( gphit(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 521 ima1 = MAXLOC( e1t(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 522 ima2 = MAXLOC( e2t(:,:), mask = llmsk ) + (/ nimpp - 1, njmpp - 1 /) 523 ENDIF 524 ! 534 525 IF(lwp) THEN 535 526 WRITE(numout,*) 536 527 WRITE(numout,*) 'dom_ctl : extrema of the masked scale factors' 537 528 WRITE(numout,*) '~~~~~~~' 538 WRITE(numout,"(14x,'e1t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1max, ima1(1), ima1(2) 539 WRITE(numout,"(14x,'e1t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1min, imi1(1), imi1(2) 540 WRITE(numout,"(14x,'e2t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2max, ima2(1), ima2(2) 541 WRITE(numout,"(14x,'e2t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2min, imi2(1), imi2(2) 529 WRITE(numout,"(14x,'glamt mini: ',1f10.2,' at i = ',i5,' j= ',i5)") zglmin, imil(1), imil(2) 530 WRITE(numout,"(14x,'glamt maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") zglmax, imal(1), imal(2) 531 WRITE(numout,"(14x,'gphit mini: ',1f10.2,' at i = ',i5,' j= ',i5)") zgpmin, imip(1), imip(2) 532 WRITE(numout,"(14x,'gphit maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") zgpmax, imap(1), imap(2) 533 WRITE(numout,"(14x,' e1t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1min, imi1(1), imi1(2) 534 WRITE(numout,"(14x,' e1t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1max, ima1(1), ima1(2) 535 WRITE(numout,"(14x,' e2t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2min, imi2(1), imi2(2) 536 WRITE(numout,"(14x,' e2t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2max, ima2(1), ima2(2) 542 537 ENDIF 543 538 ! … … 606 601 IF(lwp) THEN 607 602 WRITE(numout,*) ' cn_cfg = ', TRIM(cd_cfg), ' nn_cfg = ', kk_cfg 608 WRITE(numout,*) ' jpiglo = ', kpi609 WRITE(numout,*) ' jpjglo = ', kpj603 WRITE(numout,*) ' Ni0glo = ', kpi 604 WRITE(numout,*) ' Nj0glo = ', kpj 610 605 WRITE(numout,*) ' jpkglo = ', kpk 611 606 WRITE(numout,*) ' type of global domain lateral boundary jperio = ', kperio … … 631 626 !!---------------------------------------------------------------------- 632 627 INTEGER :: ji, jj, jk ! dummy loop indices 633 INTEGER :: izco, izps, isco, icav634 628 INTEGER :: inum ! local units 635 629 CHARACTER(len=21) :: clnam ! filename (mesh and mask informations) … … 646 640 ! 647 641 clnam = cn_domcfg_out ! filename (configuration information) 648 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 649 642 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 650 643 ! 651 644 ! !== ORCA family specificities ==! … … 655 648 ENDIF 656 649 ! 657 ! !== global domain size ==!658 !659 CALL iom_rstput( 0, 0, inum, 'jpiglo', REAL( jpiglo, wp), ktype = jp_i4 )660 CALL iom_rstput( 0, 0, inum, 'jpjglo', REAL( jpjglo, wp), ktype = jp_i4 )661 CALL iom_rstput( 0, 0, inum, 'jpkglo', REAL( jpk , wp), ktype = jp_i4 )662 !663 650 ! !== domain characteristics ==! 664 651 ! … … 667 654 ! 668 655 ! ! type of vertical coordinate 669 IF( ln_zco ) THEN ; izco = 1 ; ELSE ; izco = 0 ; ENDIF 670 IF( ln_zps ) THEN ; izps = 1 ; ELSE ; izps = 0 ; ENDIF 671 IF( ln_sco ) THEN ; isco = 1 ; ELSE ; isco = 0 ; ENDIF 672 CALL iom_rstput( 0, 0, inum, 'ln_zco' , REAL( izco, wp), ktype = jp_i4 ) 673 CALL iom_rstput( 0, 0, inum, 'ln_zps' , REAL( izps, wp), ktype = jp_i4 ) 674 CALL iom_rstput( 0, 0, inum, 'ln_sco' , REAL( isco, wp), ktype = jp_i4 ) 656 CALL iom_rstput( 0, 0, inum, 'ln_zco', REAL(COUNT((/ln_zco/)), wp), ktype = jp_i4 ) 657 CALL iom_rstput( 0, 0, inum, 'ln_zps', REAL(COUNT((/ln_zps/)), wp), ktype = jp_i4 ) 658 CALL iom_rstput( 0, 0, inum, 'ln_sco', REAL(COUNT((/ln_sco/)), wp), ktype = jp_i4 ) 675 659 ! 676 660 ! ! ocean cavities under iceshelves 677 IF( ln_isfcav ) THEN ; icav = 1 ; ELSE ; icav = 0 ; ENDIF 678 CALL iom_rstput( 0, 0, inum, 'ln_isfcav', REAL( icav, wp), ktype = jp_i4 ) 661 CALL iom_rstput( 0, 0, inum, 'ln_isfcav', REAL(COUNT((/ln_isfcav/)), wp), ktype = jp_i4 ) 679 662 ! 680 663 ! !== horizontal mesh ! -
NEMO/trunk/src/OCE/DOM/domhgr.F90
r10068 r13286 31 31 USE iom ! I/O library 32 32 USE lib_mpp ! MPP library 33 USE lbclnk ! lateal boundary condition / mpp exchanges 33 34 USE timing ! Timing 34 35 … … 88 89 ENDIF 89 90 ! 90 !91 91 IF( ln_read_cfg ) THEN !== read in mesh_mask.nc file ==! 92 ! 92 93 IF(lwp) WRITE(numout,*) 93 94 IF(lwp) WRITE(numout,*) ' ==>>> read horizontal mesh in ', TRIM( cn_domcfg ), ' file' … … 112 113 ! 113 114 ENDIF 114 !115 115 ! !== Coriolis parameter ==! (if necessary) 116 116 ! … … 126 126 ENDIF 127 127 ENDIF 128 129 128 ! 130 129 ! !== associated horizontal metrics ==! … … 150 149 e2_e1u(:,:) = e2u(:,:) / e1u(:,:) 151 150 e1_e2v(:,:) = e1v(:,:) / e2v(:,:) 152 !153 151 ! 154 152 IF( ln_timing ) CALL timing_stop('dom_hgr') … … 189 187 CALL iom_open( cn_domcfg, inum ) 190 188 ! 191 CALL iom_get( inum, jpdom_ data, 'glamt', plamt, lrowattr=ln_use_jattr)192 CALL iom_get( inum, jpdom_ data, 'glamu', plamu, lrowattr=ln_use_jattr)193 CALL iom_get( inum, jpdom_ data, 'glamv', plamv, lrowattr=ln_use_jattr)194 CALL iom_get( inum, jpdom_ data, 'glamf', plamf, lrowattr=ln_use_jattr)195 ! 196 CALL iom_get( inum, jpdom_ data, 'gphit', pphit, lrowattr=ln_use_jattr)197 CALL iom_get( inum, jpdom_ data, 'gphiu', pphiu, lrowattr=ln_use_jattr)198 &nb