Changeset 5350
- Timestamp:
- 2015-06-04T16:12:19+02:00 (9 years ago)
- Location:
- branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM
- Files:
-
- 3 deleted
- 199 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/ARCH/INGV/arch-IBM_EKMAN_INGV.fcm
r5094 r5350 18 18 %NCDF_INC -I/srv/lib/netcdf-x/include 19 19 %NCDF_LIB -L/srv/lib/netcdf-x/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lstdc++ 20 %XIOS_ROOT /home/delrosso/XIOS_ 482/XIOS20 %XIOS_ROOT /home/delrosso/XIOS_1.0/xios-1.0 21 21 %MPI_INTEL -I/srv/intel/impi/4.1.0.024/include 22 22 %CPP cpp -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r5109 r5350 394 394 &namptr ! Poleward Transport Diagnostic 395 395 !----------------------------------------------------------------------- 396 ln_diaznl = .false. ! Add zonal means and meridional stream functions 397 ln_subbas = .false. ! Atlantic/Pacific/Indian basins computation (T) or not 398 ! (orca configuration only, need input basins mask file named "subbasins.nc" 399 ln_ptrcomp = .false. ! Add decomposition : overturning 400 / 401 !----------------------------------------------------------------------- 396 / 402 397 &namhsb ! Heat and salt budgets 403 398 !----------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
r5102 r5350 195 195 &nameos ! ocean physical parameters 196 196 !----------------------------------------------------------------------- 197 nn_eos = 2! type of equation of state and Brunt-Vaisala frequency197 nn_eos = 0 ! type of equation of state and Brunt-Vaisala frequency 198 198 / 199 199 !----------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb0
r4394 r5350 114 114 export VAR1_Ithick V1It_PREF V1It_SUFF 115 115 export VAR1_SNOW V1SNOW_PREF V1SNOW_SUFF 116 export VAR1_IvelV V1IvV_PREF V1IvV_ PREF116 export VAR1_IvelV V1IvV_PREF V1IvV_SUFF 117 117 #===================== EXP2 ===================== 118 118 export DATE1_2 DATE2_2 … … 127 127 export VAR2_Ithick V2It_PREF V2It_SUFF 128 128 export VAR2_SNOW V2SNOW_PREF V2SNOW_SUFF 129 export VAR2_IvelV V2IvV_PREF V2IvV_ PREF129 export VAR2_IvelV V2IvV_PREF V2IvV_SUFF 130 130 # -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb2
r4394 r5350 114 114 export VAR1_Ithick V1It_PREF V1It_SUFF 115 115 export VAR1_SNOW V1SNOW_PREF V1SNOW_SUFF 116 export VAR1_IvelV V1IvV_PREF V1IvV_ PREF116 export VAR1_IvelV V1IvV_PREF V1IvV_SUFF 117 117 #===================== EXP2 ===================== 118 118 export DATE1_2 DATE2_2 … … 127 127 export VAR2_Ithick V2It_PREF V2It_SUFF 128 128 export VAR2_SNOW V2SNOW_PREF V2SNOW_SUFF 129 export VAR2_IvelV V2IvV_PREF V2IvV_ PREF129 export VAR2_IvelV V2IvV_PREF V2IvV_SUFF 130 130 # -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example1
r4394 r5350 112 112 export VAR1_Ithick V1It_PREF V1It_SUFF 113 113 export VAR1_SNOW V1SNOW_PREF V1SNOW_SUFF 114 export VAR1_IvelV V1IvV_PREF V1IvV_ PREF114 export VAR1_IvelV V1IvV_PREF V1IvV_SUFF 115 115 #===================== EXP2 ===================== 116 116 export DATE1_2 DATE2_2 … … 125 125 export VAR2_Ithick V2It_PREF V2It_SUFF 126 126 export VAR2_SNOW V2SNOW_PREF V2SNOW_SUFF 127 export VAR2_IvelV V2IvV_PREF V2IvV_ PREF127 export VAR2_IvelV V2IvV_PREF V2IvV_SUFF 128 128 # -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example2
r4394 r5350 112 112 export VAR1_Ithick V1It_PREF V1It_SUFF 113 113 export VAR1_SNOW V1SNOW_PREF V1SNOW_SUFF 114 export VAR1_IvelV V1IvV_PREF V1IvV_ PREF114 export VAR1_IvelV V1IvV_PREF V1IvV_SUFF 115 115 #===================== EXP2 ===================== 116 116 export DATE1_2 DATE2_2 … … 125 125 export VAR2_Ithick V2It_PREF V2It_SUFF 126 126 export VAR2_SNOW V2SNOW_PREF V2SNOW_SUFF 127 export VAR2_IvelV V2IvV_PREF V2IvV_ PREF127 export VAR2_IvelV V2IvV_PREF V2IvV_SUFF 128 128 # -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/domain_def.xml
r4690 r5350 6 6 <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 7 7 <domain id="1point" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="1" zoom_nj="1" /> 8 <domain id="ptr" zoom_ibegin="0000" zoom_jbegin="1" zoom_ni="1" zoom_nj="0000" /> 8 9 <!-- Eq section --> 9 10 <domain id="EqT" zoom_ibegin="1" zoom_jbegin="0000" zoom_ni="0000" zoom_nj="1" /> -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/field_def.xml
r5342 r5350 562 562 <field id="berg_real_calving" long_name="icb calving into iceberg class" unit="kg/s" axis_ref="icbcla" /> 563 563 <field id="berg_stored_ice" long_name="icb accumulated ice mass by class" unit="kg" axis_ref="icbcla" /> 564 </field_group> 565 566 <!-- Poleward transport : ptr --> 567 <field_group id="diaptr" domain_ref="ptr" > 568 <field id="zomsfglo" long_name="Meridional Stream-Function: Global" unit="Sv" grid_ref="grid_W_3D" /> 569 <field id="zomsfatl" long_name="Meridional Stream-Function: Atlantic" unit="Sv" grid_ref="grid_W_3D" /> 570 <field id="zomsfpac" long_name="Meridional Stream-Function: Pacific" unit="Sv" grid_ref="grid_W_3D" /> 571 <field id="zomsfind" long_name="Meridional Stream-Function: Indian" unit="Sv" grid_ref="grid_W_3D" /> 572 <field id="zomsfipc" long_name="Meridional Stream-Function: Pacific+Indian" unit="Sv" grid_ref="grid_W_3D" /> 573 <field id="zotemglo" long_name="Zonal Mean Temperature : Global" unit="degC" grid_ref="grid_T_3D" /> 574 <field id="zotematl" long_name="Zonal Mean Temperature : Atlantic" unit="degC" grid_ref="grid_T_3D" /> 575 <field id="zotempac" long_name="Zonal Mean Temperature : Pacific" unit="degC" grid_ref="grid_T_3D" /> 576 <field id="zotemind" long_name="Zonal Mean Temperature : Indian" unit="degC" grid_ref="grid_T_3D" /> 577 <field id="zotemipc" long_name="Zonal Mean Temperature : Pacific+Indian" unit="degC" grid_ref="grid_T_3D" /> 578 <field id="zosalglo" long_name="Zonal Mean Salinity : Global" unit="1e-3" grid_ref="grid_T_3D" /> 579 <field id="zosalatl" long_name="Zonal Mean Salinity : Atlantic" unit="1e-3" grid_ref="grid_T_3D" /> 580 <field id="zosalpac" long_name="Zonal Mean Salinity : Pacific" unit="1e-3" grid_ref="grid_T_3D" /> 581 <field id="zosalind" long_name="Zonal Mean Salinity : Indian" unit="1e-3" grid_ref="grid_T_3D" /> 582 <field id="zosalipc" long_name="Zonal Mean Salinity : Pacific+Indian" unit="1e-3" grid_ref="grid_T_3D" /> 583 <field id="zosrfglo" long_name="Zonal Mean Surface" unit="m2" grid_ref="grid_T_3D" /> 584 <field id="zosrfatl" long_name="Zonal Mean Surface : Atlantic" unit="m2" grid_ref="grid_T_3D" /> 585 <field id="zosrfpac" long_name="Zonal Mean Surface : Pacific" unit="m2" grid_ref="grid_T_3D" /> 586 <field id="zosrfind" long_name="Zonal Mean Surface : Indian" unit="m2" grid_ref="grid_T_3D" /> 587 <field id="zosrfipc" long_name="Zonal Mean Surface : Pacific+Indian" unit="m2" grid_ref="grid_T_3D" /> 588 <field id="sophtadv" long_name="Advective Heat Transport" unit="PW" grid_ref="grid_T_2D" /> 589 <field id="sophtldf" long_name="Diffusive Heat Transport" unit="PW" grid_ref="grid_T_2D" /> 590 <field id="sopstadv" long_name="Advective Salt Transport" unit="Giga g/s" grid_ref="grid_T_2D" /> 591 <field id="sopstldf" long_name="Diffusive Salt Transport" unit="Giga g/s" grid_ref="grid_T_2D" /> 564 592 </field_group> 565 593 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref
r5124 r5350 14 14 !----------------------------------------------------------------------- 15 15 cn_icerst_in = "restart_ice_in" ! suffix of ice restart name (input) 16 cn_icerst_indir = "." ! directory from which to read input ice restarts 16 17 cn_icerst_out = "restart_ice" ! suffix of ice restart name (output) 18 cn_icerst_outdir = "." ! directory in which to write output ice restarts 17 19 ln_limdyn = .true. ! ice dynamics (T) or thermodynamics only (F) 18 20 ln_limdmp = .false. ! restoring ice thickness and fraction leads (T => fill namice_dmp) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref
r5129 r5350 17 17 nlay_s = 1 ! number of snow layers (only 1 is working) 18 18 cn_icerst_in = "restart_ice" ! suffix of ice restart name (input) 19 cn_icerst_indir = "." ! directory from which to read input ice restarts 19 20 cn_icerst_out = "restart_ice" ! suffix of ice restart name (output) 21 cn_icerst_outdir = "." ! directory in which to write output ice restarts 20 22 ln_limdyn = .true. ! ice dynamics (T) or thermodynamics only (F) 21 23 rn_amax = 0.999 ! maximum tolerated ice concentration … … 45 47 &namiceitd ! Ice discretization 46 48 !------------------------------------------------------------------------------ 47 nn_catbnd = 1! computation of ice category boundaries based on49 nn_catbnd = 2 ! computation of ice category boundaries based on 48 50 ! 1: tanh function 49 51 ! 2: h^(-alpha), function of rn_himean 50 rn_himean = 2. 5! expected domain-average ice thickness (m), nn_catbnd = 2 only52 rn_himean = 2.0 ! expected domain-average ice thickness (m), nn_catbnd = 2 only 51 53 / 52 54 !------------------------------------------------------------------------------ … … 94 96 ! 3: activate G(he) only --- temporary option 95 97 ! 4: activate lateral melting only --- temporary option 98 ln_it_qnsice = .true. ! iterate the surface non-solar flux with surface temperature (T) or not (F) 96 99 / 97 100 !------------------------------------------------------------------------------ -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/namelist_pisces_ref
r4529 r5350 48 48 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 49 49 concnno3 = 1.e-6 ! Nitrate half saturation of nanophytoplankton 50 concdno3 = 3.E-6 ! Phosphate half saturation for diatoms50 concdno3 = 3.E-6 ! Nitrate half saturation for diatoms 51 51 concnnh4 = 1.E-7 ! NH4 half saturation for phyto 52 52 concdnh4 = 3.E-7 ! NH4 half saturation for diatoms 53 53 concnfer = 1.E-9 ! Iron half saturation for phyto 54 54 concdfer = 3.E-9 ! Iron half saturation for diatoms 55 concbfe = 1.E-11 ! Half-saturation for Fe limitation of Bacteria56 concbnh4 = 2.E-8 ! NH4 half saturation for phyto57 concbno3 = 2.E-7 ! Phosphate half saturation for diatoms55 concbfe = 1.E-11 ! Iron half-saturation for DOC remin. 56 concbnh4 = 2.E-8 ! NH4 half saturation for DOC remin. 57 concbno3 = 2.E-7 ! Nitrate half saturation for DOC remin. 58 58 xsizedia = 1.E-6 ! Minimum size criteria for diatoms 59 59 xsizephy = 1.E-6 ! Minimum size criteria for phyto … … 61 61 xsizerd = 3.0 ! Size ratio for diatoms 62 62 xksi1 = 2.E-6 ! half saturation constant for Si uptake 63 xksi2 = 20E-6 ! half saturation constant for Si/C63 xksi2 = 20E-6 ! half saturation constant for Si/C 64 64 xkdoc = 417.E-6 ! half-saturation constant of DOC remineralization 65 65 qnfelim = 7.E-6 ! Optimal quota of phyto … … 86 86 excret2 = 0.05 ! excretion ratio of diatoms 87 87 ln_newprod = .true. ! Enable new parame. of production (T/F) 88 bresp = 0.0 0333! Basal respiration rate89 chlcnm = 0.033 ! M inimum Chl/C in nanophytoplankton90 chlcdm = 0.05 ! M inimum Chl/C in diatoms91 chlcmin = 0.004 ! M aximum Chl/c in phytoplankton88 bresp = 0.033 ! Basal respiration rate 89 chlcnm = 0.033 ! Maximum Chl/C in nanophytoplankton 90 chlcdm = 0.05 ! Maximum Chl/C in diatoms 91 chlcmin = 0.004 ! Minimum Chl/c in phytoplankton 92 92 fecnm = 40E-6 ! Maximum Fe/C in nanophytoplankton 93 fecdm = 40E-6 ! M inimum Fe/C in diatoms93 fecdm = 40E-6 ! Maximum Fe/C in diatoms 94 94 grosip = 0.159 ! mean Si/C ratio 95 95 / … … 110 110 resrat2 = 0.005 ! exsudation rate of mesozooplankton 111 111 mzrat2 = 0.03 ! mesozooplankton mortality rate 112 xprefc = 1. ! zoo preference for phyto113 xprefp = 0.3 ! zoo preference for POC114 xprefz = 1. ! zoo preference for zoo115 xprefpoc = 0.3 ! zoo preference for poc112 xprefc = 1. ! mesozoo preference for diatoms 113 xprefp = 0.3 ! mesozoo preference for nanophyto. 114 xprefz = 1. ! mesozoo preference for microzoo. 115 xprefpoc = 0.3 ! mesozoo preference for poc 116 116 xthresh2zoo = 1E-8 ! zoo feeding threshold for mesozooplankton 117 117 xthresh2dia = 1E-8 ! diatoms feeding threshold for mesozooplankton … … 119 119 xthresh2poc = 1E-8 ! poc feeding threshold for mesozooplankton 120 120 xthresh2 = 3E-7 ! Food threshold for grazing 121 xkgraz2 = 20.E-6 ! half s turation constant for meso grazing121 xkgraz2 = 20.E-6 ! half saturation constant for meso grazing 122 122 epsher2 = 0.35 ! Efficicency of Mesozoo growth 123 123 sigma2 = 0.6 ! Fraction of mesozoo excretion as DOM … … 156 156 &nampisrem ! parameters for remineralization 157 157 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 158 xremik = 0.3 5! remineralization rate of DOC158 xremik = 0.3 ! remineralization rate of DOC 159 159 xremip = 0.025 ! remineralisation rate of POC 160 160 nitrif = 0.05 ! NH4 nitrification rate -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/namelist_ref
r5342 r5350 10 10 !! 7 - dynamics (namdyn_adv, namdyn_vor, namdyn_hpg, namdyn_spg, namdyn_ldf) 11 11 !! 8 - Verical physics (namzdf, namzdf_ric, namzdf_tke, namzdf_kpp, namzdf_ddm, namzdf_tmx) 12 !! 9 - diagnostics (namnc4, namtrd, namspr, namflo, nam ptr, namhsb)12 !! 9 - diagnostics (namnc4, namtrd, namspr, namflo, namhsb, namsto) 13 13 !! 10 - miscellaneous (namsol, nammpp, namctl) 14 14 !! 11 - Obs & Assim (namobs, nam_asminc) … … 37 37 ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart 38 38 cn_ocerst_in = "restart" ! suffix of ocean restart name (input) 39 cn_ocerst_indir = "." ! directory from which to read input ocean restarts 39 40 cn_ocerst_out = "restart" ! suffix of ocean restart name (output) 41 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 40 42 nn_istate = 0 ! output the initial state (1) or not (0) 43 ln_rst_list = .false. ! output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 41 44 nn_stock = 5475 ! frequency of creation of a restart file (modulo referenced to 1) 45 nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 42 46 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000) 43 47 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) … … 51 55 !! *** Domain namelists *** 52 56 !!====================================================================== 53 !! namcfg parameters of the configuration 57 !! namcfg parameters of the configuration 54 58 !! namzgr vertical coordinate 55 59 !! namzgr_sco s-coordinate or hybrid z-s-coordinate … … 59 63 ! 60 64 !----------------------------------------------------------------------- 61 &namcfg ! parameters of the configuration 65 &namcfg ! parameters of the configuration 62 66 !----------------------------------------------------------------------- 63 67 cp_cfg = "default" ! name of the configuration … … 73 77 jperio = 0 ! lateral cond. type (between 0 and 6) 74 78 ! = 0 closed ; = 1 cyclic East-West 75 ! = 2 equatorial symmetric ; = 3 North fold T-point pivot 79 ! = 2 equatorial symmetric ; = 3 North fold T-point pivot 76 80 ! = 4 cyclic East-West AND North fold T-point pivot 77 81 ! = 5 North fold F-point pivot 78 82 ! = 6 cyclic East-West AND North fold F-point pivot 79 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 83 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 80 84 ! in netcdf input files, as the start j-row for reading 81 85 / … … 102 106 !!!!!!! SH94 stretching coefficients (ln_s_sh94 = .true.) 103 107 rn_theta = 6.0 ! surface control parameter (0<=theta<=20) 104 rn_bb = 0.8 ! stretching with SH94 s-sigma 108 rn_bb = 0.8 ! stretching with SH94 s-sigma 105 109 !!!!!!! SF12 stretching coefficient (ln_s_sf12 = .true.) 106 110 rn_alpha = 4.4 ! stretching with SF12 s-sigma … … 111 115 rn_zb_b = -0.2 ! offset for calculating Zb 112 116 !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above] 113 rn_thetb = 1.0 ! bottom control parameter (0<=thetb<= 1) 117 rn_thetb = 1.0 ! bottom control parameter (0<=thetb<= 1) 114 118 / 115 119 !----------------------------------------------------------------------- … … 119 123 rn_bathy = 0. ! value of the bathymetry. if (=0) bottom flat at jpkm1 120 124 nn_closea = 0 ! remove (=0) or keep (=1) closed seas and lakes (ORCA) 121 nn_msh = 0! create (=1) a mesh file or not (=0)125 nn_msh = 1 ! create (=1) a mesh file or not (=0) 122 126 rn_hmin = -3. ! min depth of the ocean (>0) or min number of ocean level (<0) 123 127 rn_e3zps_min= 20. ! partial step thickness is set larger than the minimum of … … 165 169 nn_baro = 30 ! Number of iterations of barotropic mode 166 170 ! during rn_rdt seconds. Only used if ln_bt_nn_auto=F 167 rn_bt_cmax = 0.8 ! Maximum courant number allowed if ln_bt_nn_auto=T 171 rn_bt_cmax = 0.8 ! Maximum courant number allowed if ln_bt_nn_auto=T 168 172 nn_bt_flt = 1 ! Time filter choice 169 173 ! = 0 None 170 174 ! = 1 Boxcar over nn_baro barotropic steps 171 ! = 2 Boxcar over 2*nn_baro " " 175 ! = 2 Boxcar over 2*nn_baro " " 172 176 / 173 177 !----------------------------------------------------------------------- … … 246 250 ln_rnf = .true. ! runoffs (T => fill namsbc_rnf) 247 251 nn_isf = 0 ! ice shelf melting/freezing (/=0 => fill namsbc_isf) 248 ! 0 =no isf 1 = presence of ISF 249 ! 2 = bg03 parametrisation 3 = rnf file for isf 252 ! 0 =no isf 1 = presence of ISF 253 ! 2 = bg03 parametrisation 3 = rnf file for isf 250 254 ! 4 = ISF fwf specified 251 255 ! option 1 and 4 need ln_isfcav = .true. (domzgr) … … 278 282 &namsbc_flx ! surface boundary condition : flux formulation 279 283 !----------------------------------------------------------------------- 280 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 284 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 281 285 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 282 286 sn_utau = 'utau' , 24 , 'utau' , .false. , .false., 'yearly' , '' , '' , '' … … 321 325 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 322 326 rn_zqt = 10. ! Air temperature and humidity reference height (m) 323 rn_zu = 10. ! Wind vector reference height (m) 327 rn_zu = 10. ! Wind vector reference height (m) 324 328 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 325 329 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 326 rn_vfac = 0. ! multiplicative factor for ocean/ice velocity 330 rn_vfac = 0. ! multiplicative factor for ocean/ice velocity 327 331 ! in the calculation of the wind stress (0.=absolute winds or 1.=relative winds) 328 332 / … … 374 378 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 375 379 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 376 sn_usp = 'sas_grid_U' , 120 , 'vozocrtx' , .true. , .true. , 'yearly' , '' , '' , '' 380 sn_usp = 'sas_grid_U' , 120 , 'vozocrtx' , .true. , .true. , 'yearly' , '' , '' , '' 377 381 sn_vsp = 'sas_grid_V' , 120 , 'vomecrty' , .true. , .true. , 'yearly' , '' , '' , '' 378 382 sn_tem = 'sas_grid_T' , 120 , 'sosstsst' , .true. , .true. , 'yearly' , '' , '' , '' … … 423 427 / 424 428 !----------------------------------------------------------------------- 425 &namsbc_isf ! Top boundary layer (ISF) 429 &namsbc_isf ! Top boundary layer (ISF) 426 430 !----------------------------------------------------------------------- 427 431 ! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'yearly'/ ! weights ! rotation ! … … 500 504 ! Initial mass required for an iceberg of each class 501 505 rn_initial_mass = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11 502 ! Proportion of calving mass to apportion to each class 506 ! Proportion of calving mass to apportion to each class 503 507 rn_distribution = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02 504 508 ! Ratio between effective and real iceberg mass (non-dim) 505 ! i.e. number of icebergs represented at a point 509 ! i.e. number of icebergs represented at a point 506 510 rn_mass_scaling = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1 507 511 ! thickness of newly calved bergs (m) … … 512 516 rn_bits_erosion_fraction = 0. ! Fraction of erosion melt flux to divert to bergy bits 513 517 rn_sicn_shift = 0. ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1) 514 ln_passive_mode = .false. ! iceberg - ocean decoupling 518 ln_passive_mode = .false. ! iceberg - ocean decoupling 515 519 nn_test_icebergs = 10 ! Create test icebergs of this class (-1 = no) 516 520 ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2) 517 521 rn_test_box = 108.0, 116.0, -66.0, -58.0 518 rn_speed_limit = 0. ! CFL speed limit for a berg 522 rn_speed_limit = 0. ! CFL speed limit for a berg 519 523 520 524 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 521 525 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename ! 522 526 sn_icb = 'calving' , -1 , 'calvingmask', .true. , .true. , 'yearly' , '' , '' , '' 523 524 cn_dir = './' 527 528 cn_dir = './' 525 529 / 526 530 … … 583 587 ln_tide_ramp = .false. ! 584 588 rdttideramp = 0. ! 585 clname(1) = 'M2' ! name of constituent 586 clname(2) = 'S2' 587 clname(3) = 'N2' 588 clname(4) = 'K1' 589 clname(5) = 'O1' 590 clname(6) = 'Q1' 591 clname(7) = 'M4' 592 clname(8) = 'K2' 593 clname(9) = 'P1' 594 clname(10) = 'Mf' 595 clname(11) = 'Mm' 589 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg 596 590 / 597 591 !----------------------------------------------------------------------- … … 608 602 ! = 2, use tidal harmonic forcing data from files 609 603 ! = 3, use external data AND tidal harmonic forcing 610 cn_dyn3d = 'none' ! 604 cn_dyn3d = 'none' ! 611 605 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state 612 606 ! = 1, bdy data are read in 'bdydata .nc' files 613 cn_tra = 'none' ! 607 cn_tra = 'none' ! 614 608 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state 615 609 ! = 1, bdy data are read in 'bdydata .nc' files 616 cn_ice_lim = 'none' ! 610 cn_ice_lim = 'none' ! 617 611 nn_ice_lim_dta = 0 ! = 0, bdy data are equal to the initial state 618 612 ! = 1, bdy data are read in 'bdydata .nc' files … … 623 617 ln_tra_dmp =.false. ! open boudaries conditions for tracers 624 618 ln_dyn3d_dmp =.false. ! open boundary condition for baroclinic velocities 625 rn_time_dmp = 1. ! Damping time scale in days 619 rn_time_dmp = 1. ! Damping time scale in days 626 620 rn_time_dmp_out = 1. ! Outflow damping time scale 627 621 nn_rimwidth = 10 ! width of the relaxation zone … … 676 670 rn_bfri2_max = 1.e-1 ! max. bottom drag coefficient (non linear case and ln_loglayer=T) 677 671 rn_bfeb2 = 2.5e-3 ! bottom turbulent kinetic energy background (m2/s2) 678 rn_bfrz0 = 3.e-3 ! bottom roughness [m] if ln_loglayer=T 672 rn_bfrz0 = 3.e-3 ! bottom roughness [m] if ln_loglayer=T 679 673 ln_bfr2d = .false. ! horizontal variation of the bottom friction coef (read a 2D mask file ) 680 674 rn_bfrien = 50. ! local multiplying factor of bfr (ln_bfr2d=T) … … 722 716 !----------------------------------------------------------------------- 723 717 nn_eos = -1 ! type of equation of state and Brunt-Vaisala frequency 724 ! =-1, TEOS-10 725 ! = 0, EOS-80 718 ! =-1, TEOS-10 719 ! = 0, EOS-80 726 720 ! = 1, S-EOS (simplified eos) 727 721 ln_useCT = .true. ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm … … 814 808 !----------------------------------------------------------------------- 815 809 ln_dynadv_vec = .true. ! vector form (T) or flux form (F) 810 nn_dynkeg = 0 ! scheme for grad(KE): =0 C2 ; =1 Hollingsworth correction 816 811 ln_dynadv_cen2= .false. ! flux form - 2nd order centered scheme 817 812 ln_dynadv_ubs = .false. ! flux form - 3rd order UBS scheme … … 821 816 &nam_vvl ! vertical coordinate options 822 817 !----------------------------------------------------------------------- 823 ln_vvl_zstar = .true. ! zstar vertical coordinate 818 ln_vvl_zstar = .true. ! zstar vertical coordinate 824 819 ln_vvl_ztilde = .false. ! ztilde vertical coordinate: only high frequency variations 825 820 ln_vvl_layer = .false. ! full layer vertical coordinate … … 1006 1001 !! namc1d_uvd data: U & V currents ("key_c1d") 1007 1002 !! namc1d_dyndmp U & V newtonian damping ("key_c1d") 1003 !! namsto Stochastic parametrization of EOS 1008 1004 !!====================================================================== 1009 1005 ! … … 1064 1060 ln_dyndmp = .false. ! add a damping term (T) or not (F) 1065 1061 / 1062 !----------------------------------------------------------------------- 1063 &namsto ! Stochastic parametrization of EOS 1064 !----------------------------------------------------------------------- 1065 ln_rststo = .false. ! start from mean parameter (F) or from restart file (T) 1066 ln_rstseed = .true. ! read seed of RNG from restart file 1067 cn_storst_in = "restart_sto" ! suffix of stochastic parameter restart file (input) 1068 cn_storst_out = "restart_sto" ! suffix of stochastic parameter restart file (output) 1069 1070 ln_sto_eos = .false. ! stochastic equation of state 1071 nn_sto_eos = 1 ! number of independent random walks 1072 rn_eos_stdxy = 1.4 ! random walk horz. standard deviation (in grid points) 1073 rn_eos_stdz = 0.7 ! random walk vert. standard deviation (in grid points) 1074 rn_eos_tcor = 1440.0 ! random walk time correlation (in timesteps) 1075 nn_eos_ord = 1 ! order of autoregressive processes 1076 nn_eos_flt = 0 ! passes of Laplacian filter 1077 rn_eos_lim = 2.0 ! limitation factor (default = 3.0) 1078 / 1066 1079 1067 1080 !!====================================================================== … … 1070 1083 !! namnc4 netcdf4 chunking and compression settings ("key_netcdf4") 1071 1084 !! namtrd dynamics and/or tracer trends 1085 !! namptr Poleward Transport Diagnostics 1072 1086 !! namflo float parameters ("key_float") 1073 !! namptr Poleward Transport Diagnostics1074 1087 !! namhsb Heat and salt budgets 1075 1088 !!====================================================================== … … 1125 1138 !----------------------------------------------------------------------- 1126 1139 ln_diaptr = .false. ! Poleward heat and salt transport (T) or not (F) 1127 ln_diaznl = .true. ! Add zonal means and meridional stream functions 1128 ln_subbas = .true. ! Atlantic/Pacific/Indian basins computation (T) or not 1129 ! (orca configuration only, need input basins mask file named "subbasins.nc" 1130 ln_ptrcomp = .true. ! Add decomposition : overturning 1131 nn_fptr = 1 ! Frequency of ptr computation [time step] 1132 nn_fwri = 15 ! Frequency of ptr outputs [time step] 1140 ln_subbas = .false. ! Atlantic/Pacific/Indian basins computation (T) or not 1133 1141 / 1134 1142 !----------------------------------------------------------------------- … … 1180 1188 ln_sst = .false. ! Logical switch for SST observations 1181 1189 ln_reysst = .false. ! ln_reysst Logical switch for Reynolds observations 1182 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1190 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1183 1191 1184 1192 ln_sstfb = .false. ! Logical switch for feedback SST data … … 1207 1215 sstfbfiles = 'sst_01.nc' 1208 1216 ! seaicefiles Sea Ice input observation file names 1209 seaicefiles = 'seaice_01.nc' 1217 seaicefiles = 'seaice_01.nc' 1210 1218 ! velavcurfiles Vel. cur. daily av. input file name 1211 1219 ! velhvcurfiles Vel. cur. high freq. input file name -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r5102 r5350 21 21 ! = 2 calendar parameters read in the restart file 22 22 cn_trcrst_in = "restart_trc" ! suffix of pass. sn_tracer restart name (input) 23 cn_trcrst_indir = "." ! directory from which to read input passive tracer restarts 23 24 cn_trcrst_out = "restart_trc" ! suffix of pass. sn_tracer restart name (output) 25 cn_trcrst_outdir = "." ! directory to which to write output passive tracer restarts 24 26 / 25 27 !----------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/cfg.txt
r5102 r5350 8 8 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 9 9 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 10 ISOMIP OPA_SRC11 10 GYRE OPA_SRC 12 11 ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/makenemo
r5092 r5350 200 200 ;; 201 201 add_key) 202 # Checking void argument 203 [ ! -z $2] && { list_add_key=$2; export ${list_add_key}; }202 # Checking if argument has anything other than whitespace 203 [[ ! "$2" =~ ^\ +$ ]] && { list_add_key=$2; export ${list_add_key}; } 204 204 shift 205 205 ;; 206 206 del_key) 207 # Checking void argument 208 [ ! -z $2] && { list_del_key=$2; export ${list_del_key}; }207 # Checking if argument has anything other than whitespace 208 [[ ! "$2" =~ ^\ +$ ]] && { list_del_key=$2; export ${list_del_key}; } 209 209 shift 210 210 ;; … … 317 317 318 318 #- At this stage new configuration has been added, we add or remove keys 319 [ ! -z ${list_add_key}] && { . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}; }320 [ ! -z ${list_del_key}] && { . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key}; }319 [ ! -z "${list_add_key}" ] && { . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}; } 320 [ ! -z "${list_del_key}" ] && { . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key}; } 321 321 322 322 #- check that all keys are really existing... -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/CONFIG/uspcfg.txt
r4990 r5350 1 1 ORCA1_CICE # ORCA2_LIM # OPA_SRC TOP_SRC # http://gws-access.ceda.ac.uk/public/nemo/uspconfigs/ORCA1_CICE/v3.6.0/ORCA1_CICE_ctl.txt 2 ISOMIP # GYRE # OPA_SRC # http://gws-access.ceda.ac.uk/public/nemo/uspconfigs/ISOMIP/v3.6.0/ISOMIP_ctl.txt -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
r5123 r5350 24 24 ! !!* namicerun read in iceini * 25 25 CHARACTER(len=32) , PUBLIC :: cn_icerst_in !: suffix of ice restart name (input) 26 CHARACTER(len=256) , PUBLIC :: cn_icerst_indir !: ice restart in directory 26 27 CHARACTER(len=32) , PUBLIC :: cn_icerst_out !: suffix of ice restart name (output) 28 CHARACTER(len=256) , PUBLIC :: cn_icerst_outdir !: ice restart out directory 27 29 LOGICAL , PUBLIC :: ln_limdyn !: flag for ice dynamics (T) or not (F) 28 30 LOGICAL , PUBLIC :: ln_limdmp !: Ice damping -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
r4624 r5350 40 40 !!---------------------------------------------------------------------- 41 41 !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) 42 !! $Id$ 42 !! $Id$ 43 43 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 44 44 !!---------------------------------------------------------------------- … … 123 123 !! ** input : Namelist namicerun 124 124 !!------------------------------------------------------------------- 125 NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 125 NAMELIST/namicerun/ cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & 126 ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 126 127 INTEGER :: ios ! Local integer output status for namelist read 127 128 !!------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_2/limrhg.F90
- Property svn:keywords set to Id
-
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r2528 r5350 50 50 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 51 51 CHARACTER(LEN=50) :: clname ! ice output restart file name 52 CHARACTER(len=150) :: clpath ! full path to ice output restart file 52 53 !!---------------------------------------------------------------------- 53 54 ! … … 58 59 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 59 60 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 60 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 61 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 62 ELSE ; WRITE(clkt, '(i8.8)') nitrst 61 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 62 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 63 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 64 ELSE ; WRITE(clkt, '(i8.8)') nitrst 65 ENDIF 66 ! create the file 67 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 68 clpath = TRIM(cn_icerst_outdir) 69 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 70 IF(lwp) THEN 71 WRITE(numout,*) 72 SELECT CASE ( jprstlib ) 73 CASE ( jprstdimg ) 74 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname 75 CASE DEFAULT 76 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname 77 END SELECT 78 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 79 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 80 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 81 ENDIF 82 ENDIF 83 84 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 85 lrst_ice = .TRUE. 63 86 ENDIF 64 ! create the file65 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)66 IF(lwp) THEN67 WRITE(numout,*)68 SELECT CASE ( jprstlib )69 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname70 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname71 END SELECT72 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN73 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp74 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp75 ENDIF76 ENDIF77 78 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )79 lrst_ice = .TRUE.80 87 ENDIF 81 88 ! … … 188 195 ! eventually read netcdf file (monobloc) for restarting on different number of processors 189 196 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 190 INQUIRE( FILE = TRIM(cn_icerst_in )//'.nc', EXIST = llok )197 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 191 198 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 192 199 ENDIF 193 200 194 CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt )201 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt ) 195 202 196 203 CALL iom_get( numrir, 'kt_ice' , ziter ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r5128 r5350 198 198 INTEGER , PUBLIC :: nn_ice_thcon !: thermal conductivity: =0 Untersteiner (1964) ; =1 Pringle et al (2007) 199 199 INTEGER , PUBLIC :: nn_monocat !: virtual ITD mono-category parameterizations (1) or not (0) 200 LOGICAL , PUBLIC :: ln_it_qnsice !: iterate surface flux with changing surface temperature or not (F) 200 201 201 202 ! !!** ice-mechanical redistribution namelist (namiceitdme) … … 285 286 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hfx_snw !: heat flux for snow melt 286 287 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hfx_err !: heat flux error after heat diffusion 288 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hfx_err_dif !: heat flux remaining due to change in non-solar flux 287 289 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hfx_err_rem !: heat flux error after heat remapping 288 290 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hfx_in !: heat flux available for thermo transformations … … 371 373 INTEGER , PUBLIC :: nlay_s !: number of snow layers 372 374 CHARACTER(len=32), PUBLIC :: cn_icerst_in !: suffix of ice restart name (input) 375 CHARACTER(len=256), PUBLIC :: cn_icerst_indir !: ice restart input directory 373 376 CHARACTER(len=32), PUBLIC :: cn_icerst_out !: suffix of ice restart name (output) 377 CHARACTER(len=256), PUBLIC :: cn_icerst_outdir!: ice restart output directory 374 378 LOGICAL , PUBLIC :: ln_limdyn !: flag for ice dynamics (T) or not (F) 375 379 LOGICAL , PUBLIC :: ln_icectl !: flag for sea-ice points output (T) or not (F) … … 392 396 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_trp_smv !: transport of salt content 393 397 ! 394 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_heat_dhc !: snw/ice heat content variation [W/m2] 398 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_heat !: snw/ice heat content variation [W/m2] 399 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_smvi !: ice salt content variation [] 400 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_vice !: ice volume variation [m/s] 401 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_vsnw !: snw volume variation [m/s] 395 402 ! 396 403 !!---------------------------------------------------------------------- … … 433 440 & sfx_res(jpi,jpj) , sfx_bri(jpi,jpj) , sfx_dyn(jpi,jpj) , & 434 441 & sfx_bog(jpi,jpj) , sfx_bom(jpi,jpj) , sfx_sum(jpi,jpj) , sfx_sni(jpi,jpj) , sfx_opw(jpi,jpj) , & 435 & hfx_res(jpi,jpj) , hfx_snw(jpi,jpj) , hfx_sub(jpi,jpj) , hfx_err(jpi,jpj) , hfx_err_rem(jpi,jpj), & 442 & hfx_res(jpi,jpj) , hfx_snw(jpi,jpj) , hfx_sub(jpi,jpj) , hfx_err(jpi,jpj) , & 443 & hfx_err_dif(jpi,jpj) , hfx_err_rem(jpi,jpj) , & 436 444 & hfx_in (jpi,jpj) , hfx_out(jpi,jpj) , fhld(jpi,jpj) , & 437 445 & hfx_sum(jpi,jpj) , hfx_bom(jpi,jpj) , hfx_bog(jpi,jpj) , hfx_dif(jpi,jpj) , hfx_opw(jpi,jpj) , & … … 452 460 ALLOCATE( t_s(jpi,jpj,nlay_s,jpl) , e_s(jpi,jpj,nlay_s,jpl) , STAT=ierr(ii) ) 453 461 ii = ii + 1 454 ALLOCATE( t_i(jpi,jpj,nlay_i +1,jpl) , e_i(jpi,jpj,nlay_i+1,jpl) , s_i(jpi,jpj,nlay_i+1,jpl) , STAT=ierr(ii) )462 ALLOCATE( t_i(jpi,jpj,nlay_i,jpl) , e_i(jpi,jpj,nlay_i,jpl) , s_i(jpi,jpj,nlay_i,jpl) , STAT=ierr(ii) ) 455 463 456 464 ! * Moments for advection … … 468 476 & STAT=ierr(ii) ) 469 477 ii = ii + 1 470 ALLOCATE( sxe (jpi,jpj,nlay_i +1,jpl) , sye (jpi,jpj,nlay_i+1,jpl) , sxxe(jpi,jpj,nlay_i+1,jpl) , &471 & syye(jpi,jpj,nlay_i +1,jpl) , sxye(jpi,jpj,nlay_i+1,jpl), STAT=ierr(ii) )478 ALLOCATE( sxe (jpi,jpj,nlay_i,jpl) , sye (jpi,jpj,nlay_i,jpl) , sxxe(jpi,jpj,nlay_i,jpl) , & 479 & syye(jpi,jpj,nlay_i,jpl) , sxye(jpi,jpj,nlay_i,jpl) , STAT=ierr(ii) ) 472 480 473 481 ! * Old values of global variables 474 482 ii = ii + 1 475 483 ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , e_s_b(jpi,jpj,nlay_s,jpl) , & 476 & a_i_b (jpi,jpj,jpl) , smv_i_b(jpi,jpj,jpl) , e_i_b(jpi,jpj,nlay_i +1 ,jpl) ,&477 & oa_i_b (jpi,jpj,jpl) , u_ice_b(jpi,jpj) , v_ice_b(jpi,jpj) 484 & a_i_b (jpi,jpj,jpl) , smv_i_b(jpi,jpj,jpl) , e_i_b(jpi,jpj,nlay_i,jpl) , & 485 & oa_i_b (jpi,jpj,jpl) , u_ice_b(jpi,jpj) , v_ice_b(jpi,jpj) , STAT=ierr(ii) ) 478 486 479 487 ! * Ice thickness distribution variables … … 483 491 ! * Ice diagnostics 484 492 ii = ii + 1 485 ALLOCATE( diag_trp_vi(jpi,jpj), diag_trp_vs (jpi,jpj), diag_trp_ei (jpi,jpj), & 486 & diag_trp_es(jpi,jpj), diag_trp_smv(jpi,jpj), diag_heat_dhc(jpi,jpj), STAT=ierr(ii) ) 493 ALLOCATE( diag_trp_vi(jpi,jpj), diag_trp_vs (jpi,jpj), diag_trp_ei(jpi,jpj), & 494 & diag_trp_es(jpi,jpj), diag_trp_smv(jpi,jpj), diag_heat (jpi,jpj), & 495 & diag_smvi (jpi,jpj), diag_vice (jpi,jpj), diag_vsnw (jpi,jpj), STAT=ierr(ii) ) 487 496 488 497 ice_alloc = MAXVAL( ierr(:) ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limcons.F90
r5123 r5350 8 8 !! 3.5 ! 2011-02 (G. Madec) add mpp considerations 9 9 !! - ! 2014-05 (C. Rousset) add lim_cons_hsm 10 !! - ! 2015-03 (C. Rousset) add lim_cons_final 10 11 !!---------------------------------------------------------------------- 11 12 #if defined key_lim3 … … 22 23 USE lib_mpp ! MPP library 23 24 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 25 USE sbc_oce , ONLY : sfx ! Surface boundary condition: ocean fields 24 26 25 27 IMPLICIT NONE … … 30 32 PUBLIC lim_cons_check 31 33 PUBLIC lim_cons_hsm 34 PUBLIC lim_cons_final 32 35 33 36 !!---------------------------------------------------------------------- … … 72 75 !! ** Method : Arithmetics 73 76 !!--------------------------------------------------------------------- 74 INTEGER 75 INTEGER 76 REAL(wp), DIMENSION(jpi,jpj,nlay_i +1,jpl), INTENT(in ) :: pin!: input field77 REAL(wp), DIMENSION(jpi,jpj) 77 INTEGER , INTENT(in ) :: ksum !: number of categories 78 INTEGER , INTENT(in ) :: klay !: number of vertical layers 79 REAL(wp), DIMENSION(jpi,jpj,nlay_i,jpl), INTENT(in ) :: pin !: input field 80 REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pout !: output field 78 81 ! 79 82 INTEGER :: jk, jl ! dummy loop indices … … 155 158 156 159 SUBROUTINE lim_cons_hsm( icount, cd_routine, zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b ) 157 !!------------------------------------------------------------------- 158 !! *** ROUTINE lim_cons_hsm *** 159 !! 160 !! ** Purpose : Test the conservation of heat, salt and mass for each routine 161 !! 162 !! ** Method : 163 !!--------------------------------------------------------------------- 164 INTEGER , INTENT(in) :: icount ! determine wether this is the beggining of the routine (0) or the end (1) 165 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine 160 !!-------------------------------------------------------------------------------------------------------- 161 !! *** ROUTINE lim_cons_hsm *** 162 !! 163 !! ** Purpose : Test the conservation of heat, salt and mass for each ice routine 164 !! + test if ice concentration and volume are > 0 165 !! 166 !! ** Method : This is an online diagnostics which can be activated with ln_limdiahsb=true 167 !! It prints in ocean.output if there is a violation of conservation at each time-step 168 !! The thresholds (zv_sill, zs_sill, zh_sill) which determine violations are set to 169 !! a minimum of 1 mm of ice (over the ice area) that is lost/gained spuriously during 100 years. 170 !! For salt and heat thresholds, ice is considered to have a salinity of 10 171 !! and a heat content of 3e5 J/kg (=latent heat of fusion) 172 !!-------------------------------------------------------------------------------------------------------- 173 INTEGER , INTENT(in) :: icount ! determine wether this is the beggining of the routine (0) or the end (1) 174 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine 166 175 REAL(wp) , INTENT(inout) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b 167 176 REAL(wp) :: zvi, zsmv, zei, zfs, zfw, zft 168 177 REAL(wp) :: zvmin, zamin, zamax 169 REAL(wp) :: z conv170 171 zconv = 1.e-9178 REAL(wp) :: zvtrp, zetrp 179 REAL(wp) :: zarea, zv_sill, zs_sill, zh_sill 180 REAL(wp), PARAMETER :: zconv = 1.e-9 ! convert W to GW and kg to Mt 172 181 173 182 IF( icount == 0 ) THEN 174 183 184 ! salt flux 175 185 zfs_b = glob_sum( ( sfx_bri(:,:) + sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + & 176 186 & sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) & 177 & ) * e12t(:,:) * tmask(:,:,1) ) 178 187 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) 188 189 ! water flux 179 190 zfw_b = glob_sum( -( wfx_bog(:,:) + wfx_bom(:,:) + wfx_sum(:,:) + wfx_sni(:,:) + wfx_opw(:,:) + & 180 191 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + wfx_sub(:,:) + wfx_spr(:,:) & 181 & ) * e12t(:,:) * tmask(:,:,1) ) 182 192 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) 193 194 ! heat flux 183 195 zft_b = glob_sum( ( hfx_sum(:,:) + hfx_bom(:,:) + hfx_bog(:,:) + hfx_dif(:,:) + hfx_opw(:,:) + hfx_snw(:,:) & 184 196 & - hfx_thd(:,:) - hfx_dyn(:,:) - hfx_res(:,:) - hfx_sub(:,:) - hfx_spr(:,:) & 185 197 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) 186 198 187 zvi_b = glob_sum( SUM( v_i (:,:,:)*rhoic + v_s(:,:,:)*rhosn, dim=3 ) * e12t(:,:) * tmask(:,:,1))188 189 zsmv_b = glob_sum( SUM( smv_i (:,:,:), dim=3 ) * e12t(:,:) * tmask(:,:,1))199 zvi_b = glob_sum( SUM( v_i * rhoic + v_s * rhosn, dim=3 ) * e12t * tmask(:,:,1) * zconv ) 200 201 zsmv_b = glob_sum( SUM( smv_i * rhoic , dim=3 ) * e12t * tmask(:,:,1) * zconv ) 190 202 191 203 zei_b = glob_sum( ( SUM( SUM( e_i(:,:,1:nlay_i,:), dim=4 ), dim=3 ) + & 192 204 & SUM( SUM( e_s(:,:,1:nlay_s,:), dim=4 ), dim=3 ) & 193 ) * e12t (:,:)* tmask(:,:,1) * zconv )205 ) * e12t * tmask(:,:,1) * zconv ) 194 206 195 207 ELSEIF( icount == 1 ) THEN 196 208 209 ! salt flux 197 210 zfs = glob_sum( ( sfx_bri(:,:) + sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + & 198 211 & sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) & 199 & ) * e12t(:,:) * tmask(:,:,1) ) - zfs_b 200 212 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) - zfs_b 213 214 ! water flux 201 215 zfw = glob_sum( -( wfx_bog(:,:) + wfx_bom(:,:) + wfx_sum(:,:) + wfx_sni(:,:) + wfx_opw(:,:) + & 202 216 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + wfx_sub(:,:) + wfx_spr(:,:) & 203 & ) * e12t(:,:) * tmask(:,:,1) ) - zfw_b 204 217 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) - zfw_b 218 219 ! heat flux 205 220 zft = glob_sum( ( hfx_sum(:,:) + hfx_bom(:,:) + hfx_bog(:,:) + hfx_dif(:,:) + hfx_opw(:,:) + hfx_snw(:,:) & 206 221 & - hfx_thd(:,:) - hfx_dyn(:,:) - hfx_res(:,:) - hfx_sub(:,:) - hfx_spr(:,:) & 207 222 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) - zft_b 208 223 209 zvi = ( glob_sum( SUM( v_i(:,:,:)*rhoic + v_s(:,:,:)*rhosn, dim=3 ) & 210 & * e12t(:,:) * tmask(:,:,1) ) - zvi_b ) * r1_rdtice - zfw 211 212 zsmv = ( glob_sum( SUM( smv_i(:,:,:), dim=3 ) * e12t(:,:) * tmask(:,:,1) ) - zsmv_b ) * r1_rdtice + ( zfs * r1_rhoic ) 224 ! outputs 225 zvi = ( ( glob_sum( SUM( v_i * rhoic + v_s * rhosn, dim=3 ) & 226 & * e12t * tmask(:,:,1) * zconv ) - zvi_b ) * r1_rdtice - zfw ) * rday 227 228 zsmv = ( ( glob_sum( SUM( smv_i * rhoic , dim=3 ) & 229 & * e12t * tmask(:,:,1) * zconv ) - zsmv_b ) * r1_rdtice + zfs ) * rday 213 230 214 231 zei = glob_sum( ( SUM( SUM( e_i(:,:,1:nlay_i,:), dim=4 ), dim=3 ) + & 215 232 & SUM( SUM( e_s(:,:,1:nlay_s,:), dim=4 ), dim=3 ) & 216 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) * r1_rdtice - zei_b * r1_rdtice + zft 233 & ) * e12t * tmask(:,:,1) * zconv ) * r1_rdtice - zei_b * r1_rdtice + zft 234 235 ! zvtrp and zetrp must be close to 0 if the advection scheme is conservative 236 zvtrp = glob_sum( ( diag_trp_vi * rhoic + diag_trp_vs * rhosn ) * e12t * tmask(:,:,1) * zconv ) * rday 237 zetrp = glob_sum( ( diag_trp_ei + diag_trp_es ) * e12t * tmask(:,:,1) * zconv ) 217 238 218 239 zvmin = glob_min( v_i ) 219 240 zamax = glob_max( SUM( a_i, dim=3 ) ) 220 241 zamin = glob_min( a_i ) 221 242 243 ! set threshold values and calculate the ice area (+epsi10 to set a threshold > 0 when there is no ice) 244 zarea = glob_sum( SUM( a_i + epsi10, dim=3 ) * e12t * zconv ) ! in 1.e9 m2 245 zv_sill = zarea * 2.5e-5 246 zs_sill = zarea * 25.e-5 247 zh_sill = zarea * 10.e-5 248 222 249 IF(lwp) THEN 223 IF ( ABS( zvi ) > 1.e-4 ) WRITE(numout,*) 'violation volume [kg/day] (',cd_routine,') = ',(zvi * rday)224 IF ( ABS( zsmv ) > 1.e-4 ) WRITE(numout,*) 'violation saline [psu*m3/day] (',cd_routine,') = ',(zsmv * rday)225 IF ( ABS( zei ) > 1.e-4 ) WRITE(numout,*) 'violation enthalpy [GW] (',cd_routine,') = ',(zei)226 IF ( zvmin < -epsi10 ) WRITE(numout,*) 'violation v_i<0 [m] (',cd_routine,') = ',(zvmin)227 IF( cd_routine /= 'limtrp' .AND. cd_routine /= 'limitd_me' .AND. zamax > rn_amax+epsi10 ) THEN228 WRITE(numout,*) 'violation a_i>amax (',cd_routine,') = ',zamax250 IF ( ABS( zvi ) > zv_sill ) WRITE(numout,*) 'violation volume [Mt/day] (',cd_routine,') = ',zvi 251 IF ( ABS( zsmv ) > zs_sill ) WRITE(numout,*) 'violation saline [psu*Mt/day] (',cd_routine,') = ',zsmv 252 IF ( ABS( zei ) > zh_sill ) WRITE(numout,*) 'violation enthalpy [GW] (',cd_routine,') = ',zei 253 IF ( ABS(zvtrp ) > zv_sill .AND. cd_routine == 'limtrp' ) THEN 254 WRITE(numout,*) 'violation vtrp [Mt/day] (',cd_routine,') = ',zvtrp 255 WRITE(numout,*) 'violation etrp [GW] (',cd_routine,') = ',zetrp 229 256 ENDIF 230 IF ( zamin < -epsi10 ) WRITE(numout,*) 'violation a_i<0 (',cd_routine,') = ',zamin 257 IF ( zvmin < -epsi10 ) WRITE(numout,*) 'violation v_i<0 [m] (',cd_routine,') = ',zvmin 258 IF ( zamax > rn_amax+epsi10 .AND. cd_routine /= 'limtrp' .AND. cd_routine /= 'limitd_me' ) THEN 259 WRITE(numout,*) 'violation a_i>amax (',cd_routine,') = ',zamax 260 ENDIF 261 IF ( zamin < -epsi10 ) WRITE(numout,*) 'violation a_i<0 (',cd_routine,') = ',zamin 231 262 ENDIF 232 263 … … 234 265 235 266 END SUBROUTINE lim_cons_hsm 267 268 SUBROUTINE lim_cons_final( cd_routine ) 269 !!--------------------------------------------------------------------------------------------------------- 270 !! *** ROUTINE lim_cons_final *** 271 !! 272 !! ** Purpose : Test the conservation of heat, salt and mass at the end of each ice time-step 273 !! 274 !! ** Method : This is an online diagnostics which can be activated with ln_limdiahsb=true 275 !! It prints in ocean.output if there is a violation of conservation at each time-step 276 !! The thresholds (zv_sill, zs_sill, zh_sill) which determine the violation are set to 277 !! a minimum of 1 mm of ice (over the ice area) that is lost/gained spuriously during 100 years. 278 !! For salt and heat thresholds, ice is considered to have a salinity of 10 279 !! and a heat content of 3e5 J/kg (=latent heat of fusion) 280 !!-------------------------------------------------------------------------------------------------------- 281 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine 282 REAL(wp) :: zhfx, zsfx, zvfx 283 REAL(wp) :: zarea, zv_sill, zs_sill, zh_sill 284 REAL(wp), PARAMETER :: zconv = 1.e-9 ! convert W to GW and kg to Mt 285 286 #if ! defined key_bdy 287 ! heat flux 288 zhfx = glob_sum( ( hfx_in - hfx_out - diag_heat - diag_trp_ei - diag_trp_es - hfx_sub ) * e12t * tmask(:,:,1) * zconv ) 289 ! salt flux 290 zsfx = glob_sum( ( sfx + diag_smvi ) * e12t * tmask(:,:,1) * zconv ) * rday 291 ! water flux 292 zvfx = glob_sum( ( wfx_ice + wfx_snw + wfx_spr + wfx_sub + diag_vice + diag_vsnw ) * e12t * tmask(:,:,1) * zconv ) * rday 293 294 ! set threshold values and calculate the ice area (+epsi10 to set a threshold > 0 when there is no ice) 295 zarea = glob_sum( SUM( a_i + epsi10, dim=3 ) * e12t * zconv ) ! in 1.e9 m2 296 zv_sill = zarea * 2.5e-5 297 zs_sill = zarea * 25.e-5 298 zh_sill = zarea * 10.e-5 299 300 IF( ABS( zvfx ) > zv_sill ) WRITE(numout,*) 'violation vfx [Mt/day] (',cd_routine,') = ',(zvfx) 301 IF( ABS( zsfx ) > zs_sill ) WRITE(numout,*) 'violation sfx [psu*Mt/day] (',cd_routine,') = ',(zsfx) 302 IF( ABS( zhfx ) > zh_sill ) WRITE(numout,*) 'violation hfx [GW] (',cd_routine,') = ',(zhfx) 303 #endif 304 305 END SUBROUTINE lim_cons_final 236 306 237 307 #else -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limctl.F90
r5125 r5350 419 419 WRITE(numout,*) ' hfx_in : ', hfx_in(ji,jj) 420 420 WRITE(numout,*) ' hfx_out : ', hfx_out(ji,jj) 421 WRITE(numout,*) ' dhc : ', diag_heat _dhc(ji,jj)421 WRITE(numout,*) ' dhc : ', diag_heat(ji,jj) 422 422 WRITE(numout,*) 423 423 WRITE(numout,*) ' hfx_dyn : ', hfx_dyn(ji,jj) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90
- Property svn:keywords set to Id
r5123 r5350 40 40 !!---------------------------------------------------------------------- 41 41 !! NEMO/OPA 3.4 , NEMO Consortium (2012) 42 !! $Id : limdiahsb.F90 3294 2012-10-18 16:44:18Z rblod$42 !! $Id$ 43 43 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 44 44 !!---------------------------------------------------------------------- … … 115 115 zbg_ihc = glob_sum( et_i(:,:) * e12t(:,:) * 1.e-20 ) ! ice heat content [1.e20 J] 116 116 zbg_shc = glob_sum( et_s(:,:) * e12t(:,:) * 1.e-20 ) ! snow heat content [1.e20 J] 117 zbg_hfx_dhc = glob_sum( diag_heat _dhc(:,:) * e12t(:,:) * tmask(:,:,1) ) ! [in W]117 zbg_hfx_dhc = glob_sum( diag_heat(:,:) * e12t(:,:) * tmask(:,:,1) ) ! [in W] 118 118 zbg_hfx_spr = glob_sum( hfx_spr(:,:) * e12t(:,:) * tmask(:,:,1) ) ! [in W] 119 119 … … 245 245 WRITE(numout,*) '~~~~~~~~~~~~' 246 246 ENDIF 247 248 ! ---------------------------------- !249 ! 2 - initial conservation variables !250 ! ---------------------------------- !251 !frc_vol = 0._wp ! volume trend due to forcing252 !frc_sal = 0._wp ! salt content - - - -253 !bg_grme = 0._wp ! ice growth + melt volume trend254 247 ! 255 248 CALL lim_diahsb_rst( nstart, 'READ' ) !* read or initialize all required files -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r5123 r5350 314 314 DO ji = 1, jpi 315 315 a_i(ji,jj,jl) = zswitch(ji,jj) * za_i_ini (jl,zhemis(ji,jj)) ! concentration 316 ht_i(ji,jj,jl) = zswitch(ji,jj) * zh_i_ini(jl,zhemis(ji,jj)) ! ice thickness316 ht_i(ji,jj,jl) = zswitch(ji,jj) * zh_i_ini(jl,zhemis(ji,jj)) ! ice thickness 317 317 ht_s(ji,jj,jl) = ht_i(ji,jj,jl) * ( zht_s_ini( zhemis(ji,jj) ) / zht_i_ini( zhemis(ji,jj) ) ) ! snow depth 318 sm_i(ji,jj,jl) = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) !+ ( 1._wp - zswitch(ji,jj) ) * rn_simin! salinity319 o_i(ji,jj,jl) = zswitch(ji,jj) * 1._wp + ( 1._wp - zswitch(ji,jj) ) ! age318 sm_i(ji,jj,jl) = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) ! salinity 319 o_i(ji,jj,jl) = zswitch(ji,jj) * 1._wp ! age (1 day) 320 320 t_su(ji,jj,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt0 ! surf temp 321 321 … … 333 333 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content 334 334 oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl) ! age content 335 END DO ! ji336 END DO ! jj337 END DO ! jl335 END DO 336 END DO 337 END DO 338 338 339 339 ! Snow temperature and heat content … … 348 348 ! Mutliply by volume, and divide by number of layers to get heat content in J/m2 349 349 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) * r1_nlay_s 350 END DO ! ji351 END DO ! jj352 END DO ! jl353 END DO ! jk350 END DO 351 END DO 352 END DO 353 END DO 354 354 355 355 ! Ice salinity, temperature and heat content … … 369 369 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 370 370 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) * r1_nlay_i 371 END DO ! ji372 END DO ! jj373 END DO ! jl374 END DO ! jk371 END DO 372 END DO 373 END DO 374 END DO 375 375 376 376 tn_ice (:,:,:) = t_su (:,:,:) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
r5134 r5350 127 127 REAL(wp) :: za, zfac ! local scalar 128 128 CHARACTER (len = 15) :: fieldid 129 REAL(wp), POINTER, DIMENSION(:,:) :: closing_net ! net rate at which area is removed (1/s)130 ! (ridging ice area - area of new ridges) / dt131 REAL(wp), POINTER, DIMENSION(:,:) :: divu_adv ! divu as implied by transport scheme (1/s)132 REAL(wp), POINTER, DIMENSION(:,:) :: opning ! rate of opening due to divergence/shear133 REAL(wp), POINTER, DIMENSION(:,:) :: closing_gross ! rate at which area removed, not counting area of new ridges134 REAL(wp), POINTER, DIMENSION(:,:) :: msnow_mlt ! mass of snow added to ocean (kg m-2)135 REAL(wp), POINTER, DIMENSION(:,:) :: esnow_mlt ! energy needed to melt snow in ocean (J m-2)136 REAL(wp), POINTER, DIMENSION(:,:) :: vt_i_init, vt_i_final ! ice volume summed over categories129 REAL(wp), POINTER, DIMENSION(:,:) :: closing_net ! net rate at which area is removed (1/s) 130 ! (ridging ice area - area of new ridges) / dt 131 REAL(wp), POINTER, DIMENSION(:,:) :: divu_adv ! divu as implied by transport scheme (1/s) 132 REAL(wp), POINTER, DIMENSION(:,:) :: opning ! rate of opening due to divergence/shear 133 REAL(wp), POINTER, DIMENSION(:,:) :: closing_gross ! rate at which area removed, not counting area of new ridges 134 REAL(wp), POINTER, DIMENSION(:,:) :: msnow_mlt ! mass of snow added to ocean (kg m-2) 135 REAL(wp), POINTER, DIMENSION(:,:) :: esnow_mlt ! energy needed to melt snow in ocean (J m-2) 136 REAL(wp), POINTER, DIMENSION(:,:) :: vt_i_init, vt_i_final ! ice volume summed over categories 137 137 ! 138 138 INTEGER, PARAMETER :: nitermax = 20 … … 142 142 IF( nn_timing == 1 ) CALL timing_start('limitd_me') 143 143 144 CALL wrk_alloc( jpi, 144 CALL wrk_alloc( jpi,jpj, closing_net, divu_adv, opning, closing_gross, msnow_mlt, esnow_mlt, vt_i_init, vt_i_final ) 145 145 146 146 IF(ln_ctl) THEN … … 153 153 ! conservation test 154 154 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limitd_me', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 155 156 CALL lim_var_zapsmall 157 CALL lim_var_glo2eqv ! equivalent variables, requested for rafting 155 158 156 159 !-----------------------------------------------------------------------------! … … 235 238 ! Reduce the closing rate if more than 100% of the open water 236 239 ! would be removed. Reduce the opening rate proportionately. 237 IF ( ato_i(ji,jj) > epsi10 .AND. athorn(ji,jj,0) > 0.0 ) THEN 238 za = athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice 239 IF ( za > ato_i(ji,jj)) THEN 240 zfac = ato_i(ji,jj) / za 241 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 242 opning(ji,jj) = opning(ji,jj) * zfac 243 ENDIF 240 za = athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice 241 IF( za > epsi20 ) THEN 242 zfac = MIN( 1._wp, ato_i(ji,jj) / za ) 243 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 244 opning (ji,jj) = opning (ji,jj) * zfac 244 245 ENDIF 245 246 … … 251 252 ! Reduce the closing rate if more than 100% of any ice category 252 253 ! would be removed. Reduce the opening rate proportionately. 253 254 254 DO jl = 1, jpl 255 255 DO jj = 1, jpj 256 256 DO ji = 1, jpi 257 IF ( a_i(ji,jj,jl) > epsi10 .AND. athorn(ji,jj,jl) > 0._wp )THEN 258 za = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice 259 IF ( za > a_i(ji,jj,jl) ) THEN 260 zfac = a_i(ji,jj,jl) / za 261 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 262 opning (ji,jj) = opning (ji,jj) * zfac 263 ENDIF 257 za = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice 258 IF( za > epsi20 ) THEN 259 zfac = MIN( 1._wp, a_i(ji,jj,jl) / za ) 260 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 261 opning (ji,jj) = opning (ji,jj) * zfac 264 262 ENDIF 265 263 END DO … … 368 366 ENDIF 369 367 370 ! updates371 CALL lim_var_glo2eqv372 CALL lim_var_zapsmall373 368 CALL lim_var_agg( 1 ) 374 369 … … 377 372 !-----------------------------------------------------------------------------! 378 373 IF(ln_ctl) THEN 374 CALL lim_var_glo2eqv 375 379 376 CALL prt_ctl_info(' ') 380 377 CALL prt_ctl_info(' - Cell values : ') … … 531 528 DO jj = 2, jpjm1 532 529 DO ji = 2, jpim1 533 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > epsi10) THEN ! ice is present530 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN 534 531 zworka(ji,jj) = ( 4.0 * strength(ji,jj) & 535 532 & + strength(ji-1,jj) * tmask(ji-1,jj,1) + strength(ji+1,jj) * tmask(ji+1,jj,1) & … … 566 563 DO jj = 1, jpj - 1 567 564 DO ji = 1, jpi - 1 568 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > epsi10) THEN ! ice is present565 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN 569 566 numts_rm = 1 ! number of time steps for the running mean 570 567 IF ( strp1(ji,jj) > 0.0 ) numts_rm = numts_rm + 1 … … 637 634 638 635 Gsum(:,:,-1) = 0._wp 639 640 DO jj = 1, jpj 641 DO ji = 1, jpi 642 IF( ato_i(ji,jj) > epsi10 ) THEN ; Gsum(ji,jj,0) = ato_i(ji,jj) 643 ELSE ; Gsum(ji,jj,0) = 0._wp 644 ENDIF 645 END DO 646 END DO 636 Gsum(:,:,0 ) = ato_i(:,:) 647 637 648 638 ! for each value of h, you have to add ice concentration then 649 639 DO jl = 1, jpl 650 DO jj = 1, jpj 651 DO ji = 1, jpi 652 IF( a_i(ji,jj,jl) > epsi10 ) THEN ; Gsum(ji,jj,jl) = Gsum(ji,jj,jl-1) + a_i(ji,jj,jl) 653 ELSE ; Gsum(ji,jj,jl) = Gsum(ji,jj,jl-1) 654 ENDIF 655 END DO 656 END DO 640 Gsum(:,:,jl) = Gsum(:,:,jl-1) + a_i(:,:,jl) 657 641 END DO 658 642 … … 828 812 LOGICAL, PARAMETER :: l_conservation_check = .true. ! if true, check conservation (useful for debugging) 829 813 ! 830 LOGICAL :: neg_ato_i ! flag for ato_i(i,j) < -puny831 LOGICAL :: large_afrac ! flag for afrac > 1832 LOGICAL :: large_afrft ! flag for afrac > 1833 814 INTEGER :: ji, jj, jl, jl1, jl2, jk ! dummy loop indices 834 815 INTEGER :: ij ! horizontal index, combines i and j loops … … 850 831 REAL(wp), POINTER, DIMENSION(:,:) :: ardg1 , ardg2 ! area of ice ridged & new ridges 851 832 REAL(wp), POINTER, DIMENSION(:,:) :: vsrdg , esrdg ! snow volume & energy of ridging ice 852 REAL(wp), POINTER, DIMENSION(:,:) :: oirdg1, oirdg2 ! areal age content of ridged & rifging ice853 833 REAL(wp), POINTER, DIMENSION(:,:) :: dhr , dhr2 ! hrmax - hrmin & hrmax^2 - hrmin^2 854 834 … … 859 839 REAL(wp), POINTER, DIMENSION(:,:) :: srdg2 ! sal*volume of new ridges 860 840 REAL(wp), POINTER, DIMENSION(:,:) :: smsw ! sal*volume of water trapped into ridges 841 REAL(wp), POINTER, DIMENSION(:,:) :: oirdg1, oirdg2 ! ice age of ice ridged 861 842 862 843 REAL(wp), POINTER, DIMENSION(:,:) :: afrft ! fraction of category area rafted … … 864 845 REAL(wp), POINTER, DIMENSION(:,:) :: virft , vsrft ! ice & snow volume of rafting ice 865 846 REAL(wp), POINTER, DIMENSION(:,:) :: esrft , smrft ! snow energy & salinity of rafting ice 866 REAL(wp), POINTER, DIMENSION(:,:) :: oirft1, oirft2 ! areal age content of rafted ice & rafting ice847 REAL(wp), POINTER, DIMENSION(:,:) :: oirft1, oirft2 ! ice age of ice rafted 867 848 868 849 REAL(wp), POINTER, DIMENSION(:,:,:) :: eirft ! ice energy of rafting ice … … 872 853 !!---------------------------------------------------------------------- 873 854 874 CALL wrk_alloc( (jpi+1)*(jpj+1), indxi, indxj )875 CALL wrk_alloc( jpi, jpj, vice_init, vice_final, eice_init, eice_final )876 CALL wrk_alloc( jpi, jpj, afrac, fvol , ardg1, ardg2, vsrdg, esrdg, oirdg1, oirdg2, dhr, dhr2 )877 CALL wrk_alloc( jpi, jpj, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw)878 CALL wrk_alloc( jpi, jpj, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )879 CALL wrk_alloc( jpi, jpj, jpl, aicen_init, vicen_init, vsnwn_init, esnwn_init, smv_i_init, oa_i_init )880 CALL wrk_alloc( jpi, jpj, nlay_i +1, eirft, erdg1, erdg2, ersw )881 CALL wrk_alloc( jpi, jpj, nlay_i +1, jpl, eicen_init )855 CALL wrk_alloc( (jpi+1)*(jpj+1), indxi, indxj ) 856 CALL wrk_alloc( jpi, jpj, vice_init, vice_final, eice_init, eice_final ) 857 CALL wrk_alloc( jpi, jpj, afrac, fvol , ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 ) 858 CALL wrk_alloc( jpi, jpj, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 ) 859 CALL wrk_alloc( jpi, jpj, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 ) 860 CALL wrk_alloc( jpi, jpj, jpl, aicen_init, vicen_init, vsnwn_init, esnwn_init, smv_i_init, oa_i_init ) 861 CALL wrk_alloc( jpi, jpj, nlay_i, eirft, erdg1, erdg2, ersw ) 862 CALL wrk_alloc( jpi, jpj, nlay_i, jpl, eicen_init ) 882 863 883 864 ! Conservation check … … 898 879 ! 1) Compute change in open water area due to closing and opening. 899 880 !------------------------------------------------------------------------------- 900 901 neg_ato_i = .false.902 903 881 DO jj = 1, jpj 904 882 DO ji = 1, jpi 905 883 ato_i(ji,jj) = ato_i(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice & 906 884 & + opning(ji,jj) * rdt_ice 907 IF ( ato_i(ji,jj) < -epsi10 ) THEN908 neg_ato_i = .TRUE.909 ELSEIF( ato_i(ji,jj) < 0._wp ) THEN ! roundoff error885 IF ( ato_i(ji,jj) < -epsi10 ) THEN ! there is a bug 886 IF(lwp) WRITE(numout,*) 'Ridging error: ato_i < 0 -- ato_i : ',ato_i(ji,jj) 887 ELSEIF( ato_i(ji,jj) < 0._wp ) THEN ! roundoff error 910 888 ato_i(ji,jj) = 0._wp 911 889 ENDIF 912 890 END DO 913 891 END DO 914 915 ! if negative open water area alert it916 IF( neg_ato_i .AND. lwp ) THEN ! there is a bug917 DO jj = 1, jpj918 DO ji = 1, jpi919 IF( ato_i(ji,jj) < -epsi10 ) THEN920 WRITE(numout,*) ''921 WRITE(numout,*) 'Ridging error: ato_i < 0'922 WRITE(numout,*) 'ato_i : ', ato_i(ji,jj)923 ENDIF924 END DO925 END DO926 ENDIF927 892 928 893 !----------------------------------------------------------------- 929 894 ! 2) Save initial state variables 930 895 !----------------------------------------------------------------- 931 932 DO jl = 1, jpl 933 aicen_init(:,:,jl) = a_i(:,:,jl) 934 vicen_init(:,:,jl) = v_i(:,:,jl) 935 vsnwn_init(:,:,jl) = v_s(:,:,jl) 936 ! 937 smv_i_init(:,:,jl) = smv_i(:,:,jl) 938 oa_i_init (:,:,jl) = oa_i (:,:,jl) 939 END DO 940 941 esnwn_init(:,:,:) = e_s(:,:,1,:) 942 943 DO jl = 1, jpl 944 DO jk = 1, nlay_i 945 eicen_init(:,:,jk,jl) = e_i(:,:,jk,jl) 946 END DO 947 END DO 896 aicen_init(:,:,:) = a_i (:,:,:) 897 vicen_init(:,:,:) = v_i (:,:,:) 898 vsnwn_init(:,:,:) = v_s (:,:,:) 899 smv_i_init(:,:,:) = smv_i(:,:,:) 900 esnwn_init(:,:,:) = e_s (:,:,1,:) 901 eicen_init(:,:,:,:) = e_i (:,:,:,:) 902 oa_i_init (:,:,:) = oa_i (:,:,:) 948 903 949 904 ! … … 972 927 END DO 973 928 974 large_afrac = .false.975 large_afrft = .false.976 977 929 DO ij = 1, icells 978 930 ji = indxi(ij) … … 988 940 arft2(ji,jj) = arft1(ji,jj) / kraft 989 941 990 oirdg1(ji,jj)= aridge(ji,jj,jl1)*closing_gross(ji,jj)*rdt_ice991 oirft1(ji,jj)= araft (ji,jj,jl1)*closing_gross(ji,jj)*rdt_ice992 oirdg2(ji,jj)= oirdg1(ji,jj) / krdg(ji,jj,jl1)993 oirft2(ji,jj)= oirft1(ji,jj) / kraft994 995 942 !--------------------------------------------------------------- 996 943 ! 3.3) Compute ridging /rafting fractions, make sure afrac <=1 … … 1000 947 afrft(ji,jj) = arft1(ji,jj) / aicen_init(ji,jj,jl1) !rafting 1001 948 1002 IF (afrac(ji,jj) > kamax + epsi10) THEN !riging1003 large_afrac = .true.1004 ELSEIF (afrac(ji,jj) > kamax) THEN! roundoff error949 IF( afrac(ji,jj) > kamax + epsi10 ) THEN ! there is a bug 950 IF(lwp) WRITE(numout,*) ' ardg > a_i -- ardg, aicen_init : ', ardg1(ji,jj), aicen_init(ji,jj,jl1) 951 ELSEIF( afrac(ji,jj) > kamax ) THEN ! roundoff error 1005 952 afrac(ji,jj) = kamax 1006 953 ENDIF 1007 IF (afrft(ji,jj) > kamax + epsi10) THEN !rafting 1008 large_afrft = .true. 1009 ELSEIF (afrft(ji,jj) > kamax) THEN ! roundoff error 954 955 IF( afrft(ji,jj) > kamax + epsi10 ) THEN ! there is a bug 956 IF(lwp) WRITE(numout,*) ' arft > a_i -- arft, aicen_init : ', arft1(ji,jj), aicen_init(ji,jj,jl1) 957 ELSEIF( afrft(ji,jj) > kamax) THEN ! roundoff error 1010 958 afrft(ji,jj) = kamax 1011 959 ENDIF … … 1019 967 vsw (ji,jj) = vrdg1(ji,jj) * rn_por_rdg 1020 968 1021 vsrdg(ji,jj) = vsnwn_init(ji,jj,jl1) * afrac(ji,jj) 1022 esrdg(ji,jj) = esnwn_init(ji,jj,jl1) * afrac(ji,jj) 1023 srdg1(ji,jj) = smv_i_init(ji,jj,jl1) * afrac(ji,jj) 1024 srdg2(ji,jj) = smv_i_init(ji,jj,jl1) * afrac(ji,jj) !! MV HC 2014 this line seems useless 969 vsrdg (ji,jj) = vsnwn_init(ji,jj,jl1) * afrac(ji,jj) 970 esrdg (ji,jj) = esnwn_init(ji,jj,jl1) * afrac(ji,jj) 971 srdg1 (ji,jj) = smv_i_init(ji,jj,jl1) * afrac(ji,jj) 972 oirdg1(ji,jj) = oa_i_init (ji,jj,jl1) * afrac(ji,jj) 973 oirdg2(ji,jj) = oa_i_init (ji,jj,jl1) * afrac(ji,jj) / krdg(ji,jj,jl1) 1025 974 1026 975 ! rafting volumes, heat contents ... 1027 virft(ji,jj) = vicen_init(ji,jj,jl1) * afrft(ji,jj) 1028 vsrft(ji,jj) = vsnwn_init(ji,jj,jl1) * afrft(ji,jj) 1029 esrft(ji,jj) = esnwn_init(ji,jj,jl1) * afrft(ji,jj) 1030 smrft(ji,jj) = smv_i_init(ji,jj,jl1) * afrft(ji,jj) 976 virft (ji,jj) = vicen_init(ji,jj,jl1) * afrft(ji,jj) 977 vsrft (ji,jj) = vsnwn_init(ji,jj,jl1) * afrft(ji,jj) 978 esrft (ji,jj) = esnwn_init(ji,jj,jl1) * afrft(ji,jj) 979 smrft (ji,jj) = smv_i_init(ji,jj,jl1) * afrft(ji,jj) 980 oirft1(ji,jj) = oa_i_init (ji,jj,jl1) * afrft(ji,jj) 981 oirft2(ji,jj) = oa_i_init (ji,jj,jl1) * afrft(ji,jj) / kraft 1031 982 1032 983 ! substract everything 1033 a_i(ji,jj,jl1) = a_i(ji,jj,jl1) - ardg1(ji,jj) - arft1(ji,jj) 1034 v_i(ji,jj,jl1) = v_i(ji,jj,jl1) - vrdg1(ji,jj) - virft(ji,jj) 1035 v_s(ji,jj,jl1) = v_s(ji,jj,jl1) - vsrdg(ji,jj) - vsrft(ji,jj) 1036 e_s(ji,jj,1,jl1) = e_s(ji,jj,1,jl1) - esrdg(ji,jj) - esrft(ji,jj) 984 a_i(ji,jj,jl1) = a_i(ji,jj,jl1) - ardg1 (ji,jj) - arft1 (ji,jj) 985 v_i(ji,jj,jl1) = v_i(ji,jj,jl1) - vrdg1 (ji,jj) - virft (ji,jj) 986 v_s(ji,jj,jl1) = v_s(ji,jj,jl1) - vsrdg (ji,jj) - vsrft (ji,jj) 987 e_s(ji,jj,1,jl1) = e_s(ji,jj,1,jl1) - esrdg (ji,jj) - esrft (ji,jj) 988 smv_i(ji,jj,jl1) = smv_i(ji,jj,jl1) - srdg1 (ji,jj) - smrft (ji,jj) 1037 989 oa_i(ji,jj,jl1) = oa_i(ji,jj,jl1) - oirdg1(ji,jj) - oirft1(ji,jj) 1038 smv_i(ji,jj,jl1) = smv_i(ji,jj,jl1) - srdg1(ji,jj) - smrft(ji,jj)1039 990 1040 991 !----------------------------------------------------------------- 1041 992 ! 3.5) Compute properties of new ridges 1042 993 !----------------------------------------------------------------- 1043 !--------- ----994 !--------- 1044 995 ! Salinity 1045 !--------- ----996 !--------- 1046 997 smsw(ji,jj) = vsw(ji,jj) * sss_m(ji,jj) ! salt content of seawater frozen in voids !! MV HC2014 1047 998 srdg2(ji,jj) = srdg1(ji,jj) + smsw(ji,jj) ! salt content of new ridge … … 1050 1001 1051 1002 sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ji,jj) * rhoic * r1_rdtice 1052 wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ji,jj) * rhoic * r1_rdtice ! gurvan:increase in ice volume du to seawater frozen in voids1003 wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ji,jj) * rhoic * r1_rdtice ! increase in ice volume du to seawater frozen in voids 1053 1004 1054 1005 !------------------------------------ … … 1134 1085 ENDIF 1135 1086 1136 IF( large_afrac .AND. lwp ) THEN ! there is a bug1137 DO ij = 1, icells1138 ji = indxi(ij)1139 jj = indxj(ij)1140 IF( afrac(ji,jj) > kamax + epsi10 ) THEN1141 WRITE(numout,*) ''1142 WRITE(numout,*) ' ardg > a_i'1143 WRITE(numout,*) ' ardg, aicen_init : ', ardg1(ji,jj), aicen_init(ji,jj,jl1)1144 ENDIF1145 END DO1146 ENDIF1147 IF( large_afrft .AND. lwp ) THEN ! there is a bug1148 DO ij = 1, icells1149 ji = indxi(ij)1150 jj = indxj(ij)1151 IF( afrft(ji,jj) > kamax + epsi10 ) THEN1152 WRITE(numout,*) ''1153 WRITE(numout,*) ' arft > a_i'1154 WRITE(numout,*) ' arft, aicen_init : ', arft1(ji,jj), aicen_init(ji,jj,jl1)1155 ENDIF1156 END DO1157 ENDIF1158 1159 1087 !------------------------------------------------------------------------------- 1160 1088 ! 4) Add area, volume, and energy of new ridge to each category jl2 … … 1190 1118 oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + oirdg2(ji,jj) * farea 1191 1119 1192 END DO ! ij1120 END DO 1193 1121 1194 1122 ! Transfer ice energy to category jl2 by ridging … … 1217 1145 e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + esrft (ji,jj) * rn_fsnowrft 1218 1146 smv_i(ji,jj ,jl2) = smv_i(ji,jj ,jl2) + smrft (ji,jj) 1219 oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + oirft2(ji,jj) 1147 oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + oirft2(ji,jj) 1220 1148 ENDIF 1221 1149 ! … … 1257 1185 ENDIF 1258 1186 ! 1259 CALL wrk_dealloc( (jpi+1)*(jpj+1), indxi, indxj )1260 CALL wrk_dealloc( jpi, jpj, vice_init, vice_final, eice_init, eice_final )1261 CALL wrk_dealloc( jpi, jpj, afrac, fvol , ardg1, ardg2, vsrdg, esrdg, oirdg1, oirdg2, dhr, dhr2 )1262 CALL wrk_dealloc( jpi, jpj, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw)1263 CALL wrk_dealloc( jpi, jpj, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )1264 CALL wrk_dealloc( jpi, jpj, jpl, aicen_init, vicen_init, vsnwn_init, esnwn_init, smv_i_init, oa_i_init )1265 CALL wrk_dealloc( jpi, jpj, nlay_i +1,eirft, erdg1, erdg2, ersw )1266 CALL wrk_dealloc( jpi, jpj, nlay_i +1, jpl,eicen_init )1187 CALL wrk_dealloc( (jpi+1)*(jpj+1), indxi, indxj ) 1188 CALL wrk_dealloc( jpi, jpj, vice_init, vice_final, eice_init, eice_final ) 1189 CALL wrk_dealloc( jpi, jpj, afrac, fvol , ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 ) 1190 CALL wrk_dealloc( jpi, jpj, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 ) 1191 CALL wrk_dealloc( jpi, jpj, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 ) 1192 CALL wrk_dealloc( jpi, jpj, jpl, aicen_init, vicen_init, vsnwn_init, esnwn_init, smv_i_init, oa_i_init ) 1193 CALL wrk_dealloc( jpi, jpj, nlay_i, eirft, erdg1, erdg2, ersw ) 1194 CALL wrk_dealloc( jpi, jpj, nlay_i, jpl, eicen_init ) 1267 1195 ! 1268 1196 END SUBROUTINE lim_itd_me_ridgeshift -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90
r5134 r5350 130 130 rswitch = MAX( 0.0, SIGN( 1.0, a_i_b(ji,jj,jl) - epsi10) ) !0 if no ice and 1 if yes 131 131 zht_i_b(ji,jj,jl) = v_i_b(ji,jj,jl) / MAX( a_i_b(ji,jj,jl), epsi10 ) * rswitch 132 !clem IF( a_i(ji,jj,jl) > epsi10 ) zdhice(ji,jj,jl) = ht_i(ji,jj,jl) - zht_i_b(ji,jj,jl)133 132 zdhice(ji,jj,jl) = ht_i(ji,jj,jl) - zht_i_b(ji,jj,jl) 134 133 END DO … … 737 736 REAL(wp), POINTER, DIMENSION(:,:) :: vt_s_init, vt_s_final ! snow volume summed over categories 738 737 !!------------------------------------------------------------------ 739 !! clem 2014/04: be carefull, rebining does not conserve salt(maybe?) => the difference is taken into account in limupdate740 738 741 739 CALL wrk_alloc( jpi,jpj,jpl, zdonor ) ! interger … … 844 842 zdvice(:,:,jl) = 0._wp 845 843 ENDIF 846 847 ! ! clem-change begin: why not doing that?848 ! DO jj = 1, jpj849 ! DO ji = 1, jpi850 ! IF( a_i(ji,jj,jl+1) > epsi10 .AND. ht_i(ji,jj,jl+1) <= hi_max(jl) ) THEN851 ! ht_i(ji,jj,jl+1) = hi_max(jl) + epsi10852 ! a_i (ji,jj,jl+1) = v_i(ji,jj,jl+1) / ht_i(ji,jj,jl+1)853 ! ENDIF854 ! END DO855 ! END DO856 ! clem-change end857 844 858 845 END DO -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r5128 r5350 55 55 CHARACTER(LEN=20) :: clkt ! ocean time-step define as a character 56 56 CHARACTER(LEN=50) :: clname ! ice output restart file name 57 CHARACTER(len=256) :: clpath ! full path to ice output restart file 57 58 !!---------------------------------------------------------------------- 58 59 ! … … 64 65 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc & 65 66 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 66 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 67 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 68 ELSE ; WRITE(clkt, '(i8.8)') nitrst 67 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 68 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 69 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 70 ELSE ; WRITE(clkt, '(i8.8)') nitrst 71 ENDIF 72 ! create the file 73 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 74 clpath = TRIM(cn_icerst_outdir) 75 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 76 IF(lwp) THEN 77 WRITE(numout,*) 78 SELECT CASE ( jprstlib ) 79 CASE ( jprstdimg ) 80 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname 81 CASE DEFAULT 82 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname 83 END SELECT 84 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 85 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 86 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 87 ENDIF 88 ENDIF 89 ! 90 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 91 lrst_ice = .TRUE. 69 92 ENDIF 70 ! create the file71 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)72 IF(lwp) THEN73 WRITE(numout,*)74 SELECT CASE ( jprstlib )75 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname76 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname77 END SELECT78 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN79 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp80 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp81 ENDIF82 ENDIF83 !84 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )85 lrst_ice = .TRUE.86 93 ENDIF 87 94 ! … … 143 150 CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 144 151 END DO 145 152 146 153 DO jl = 1, jpl 147 154 WRITE(zchar,'(I1)') jl … … 327 334 ! eventually read netcdf file (monobloc) for restarting on different number of processors 328 335 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 329 INQUIRE( FILE = TRIM(cn_icerst_in )//'.nc', EXIST = llok )336 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 330 337 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 331 338 ENDIF 332 339 333 CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )340 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib ) 334 341 335 342 CALL iom_get( numrir, 'nn_fsbc', zfice ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
r5128 r5350 42 42 USE domvvl ! Variable volume 43 43 USE limctl 44 USE limcons 44 45 45 46 IMPLICIT NONE … … 146 147 hfx_out(ji,jj) = hfx_out(ji,jj) + zf_mass + zfcm1 147 148 149 ! Add the residual from heat diffusion equation (W.m-2) 150 !------------------------------------------------------- 151 hfx_out(ji,jj) = hfx_out(ji,jj) + hfx_err_dif(ji,jj) 152 148 153 ! New qsr and qns used to compute the oceanic heat flux at the next time step 149 154 !--------------------------------------------------- … … 164 169 ! computing freshwater exchanges at the ice/ocean interface 165 170 IF( lk_cpl ) THEN 166 zemp = - emp_tot(ji,jj) + emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) ) & ! 167 & + wfx_snw(ji,jj) 171 zemp = emp_tot(ji,jj) & ! net mass flux over grid cell 172 & - emp_ice(ji,jj) * ( 1._wp - pfrld(ji,jj) ) & ! minus the mass flux intercepted by sea ice 173 & + sprecip(ji,jj) * ( pfrld(ji,jj) - pfrld(ji,jj)**rn_betas ) ! 168 174 ELSE 169 175 zemp = emp(ji,jj) * pfrld(ji,jj) & ! evaporation over oceanic fraction … … 177 183 178 184 ! mass flux at the ocean/ice interface 179 fmmflx(ji,jj) = - wfx_ice(ji,jj) * r1_rdtice! F/M mass flux save at least for biogeochemical model180 emp(ji,jj) = zemp - wfx_ice(ji,jj) - wfx_snw(ji,jj) ! mass flux + F/M mass flux (always ice/ocean mass exchange)185 fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) ) * r1_rdtice ! F/M mass flux save at least for biogeochemical model 186 emp(ji,jj) = zemp - wfx_ice(ji,jj) - wfx_snw(ji,jj) ! mass flux + F/M mass flux (always ice/ocean mass exchange) 181 187 182 188 END DO … … 222 228 ENDIF 223 229 224 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 3, ' - Final state lim_sbc - ' ) ! control print 230 ! conservation test 231 IF( ln_limdiahsb ) CALL lim_cons_final( 'limsbc' ) 232 233 ! control prints 234 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 3, ' - Final state lim_sbc - ' ) 225 235 226 236 IF(ln_ctl) THEN -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r5134 r5350 89 89 REAL(wp) :: zfric_u, zqld, zqfr 90 90 REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b 91 REAL(wp), PARAMETER :: zfric_umin = 0._wp ! lower bound for the friction velocity (cice value=5.e-04)92 REAL(wp), PARAMETER :: zch = 0.0057_wp ! heat transfer coefficient91 REAL(wp), PARAMETER :: zfric_umin = 0._wp ! lower bound for the friction velocity (cice value=5.e-04) 92 REAL(wp), PARAMETER :: zch = 0.0057_wp ! heat transfer coefficient 93 93 ! 94 94 REAL(wp), POINTER, DIMENSION(:,:) :: zqsr, zqns 95 95 !!------------------------------------------------------------------- 96 CALL wrk_alloc( jpi, 96 CALL wrk_alloc( jpi,jpj, zqsr, zqns ) 97 97 98 98 IF( nn_timing == 1 ) CALL timing_start('limthd') … … 101 101 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limthd', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 102 102 103 CALL lim_var_glo2eqv 103 104 !------------------------------------------------------------------------! 104 105 ! 1) Initialization of some variables ! … … 209 210 ! Net heat flux on top of ice-ocean [W.m-2] 210 211 ! ----------------------------------------- 211 ! First step here :heat flux at the ocean surface + precip212 ! Second step below : heat flux at the ice surface (after limthd_dif)212 ! heat flux at the ocean surface + precip 213 ! + heat flux at the ice surface 213 214 hfx_in(ji,jj) = hfx_in(ji,jj) & 214 215 ! heat flux above the ocean … … 216 217 ! latent heat of precip (note that precip is included in qns but not in qns_ice) 217 218 & + ( 1._wp - pfrld(ji,jj) ) * sprecip(ji,jj) * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus ) & 218 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) 219 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) & 220 ! heat flux above the ice 221 & + SUM( a_i_b(ji,jj,:) * ( qns_ice(ji,jj,:) + qsr_ice(ji,jj,:) ) ) 219 222 220 223 ! ----------------------------------------------------------------------------- … … 226 229 hfx_out(ji,jj) = hfx_out(ji,jj) & 227 230 ! Non solar heat flux received by the ocean 228 & + pfrld(ji,jj) * qns(ji,jj) &231 & + pfrld(ji,jj) * zqns(ji,jj) & 229 232 ! latent heat of precip (note that precip is included in qns but not in qns_ice) 230 233 & + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) & … … 311 314 ! --- lateral melting if monocat --- ! 312 315 !------------------------------------! 313 IF ( ( ( nn_monocat == 1 ) .OR. ( nn_monocat == 4 ) ) .AND. ( jpl == 1 )) THEN316 IF ( ( nn_monocat == 1 .OR. nn_monocat == 4 ) .AND. jpl == 1 ) THEN 314 317 CALL lim_thd_lam( 1, nbpb ) 315 318 END IF … … 324 327 ENDIF 325 328 ! 326 END DO 329 END DO !jl 327 330 328 331 !------------------------------------------------------------------------------! … … 350 353 END DO 351 354 352 !------------------------353 ! Ice natural aging354 !------------------------355 oa_i(:,:,:) = oa_i(:,:,:) + a_i(:,:,:) * rdt_ice /rday356 357 355 !---------------------------------- 358 356 ! Change thickness to volume 359 357 !---------------------------------- 360 CALL lim_var_eqv2glo 358 v_i(:,:,:) = ht_i(:,:,:) * a_i(:,:,:) 359 v_s(:,:,:) = ht_s(:,:,:) * a_i(:,:,:) 360 smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 361 362 ! update ice age (in case a_i changed, i.e. becomes 0 or lateral melting in monocat) 363 DO jl = 1, jpl 364 DO jj = 1, jpj 365 DO ji = 1, jpi 366 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i_b(ji,jj,jl) - epsi10 ) ) 367 oa_i(ji,jj,jl) = rswitch * oa_i(ji,jj,jl) * a_i(ji,jj,jl) / MAX( a_i_b(ji,jj,jl), epsi10 ) 368 END DO 369 END DO 370 END DO 361 371 362 372 CALL lim_var_zapsmall 373 363 374 !-------------------------------------------- 364 375 ! Diagnostic thermodynamic growth rates … … 399 410 ! 400 411 ! 401 CALL wrk_dealloc( jpi, jpj, zqsr, zqns )402 403 412 IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limthd', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 413 414 CALL wrk_dealloc( jpi,jpj, zqsr, zqns ) 415 404 416 !------------------------------------------------------------------------------| 405 417 ! 6) Transport of ice between thickness categories. | 406 418 !------------------------------------------------------------------------------| 419 ! Given thermodynamic growth rates, transport ice between thickness categories. 407 420 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limitd_th_rem', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 408 421 409 ! Given thermodynamic growth rates, transport ice between thickness categories. 410 IF( jpl > 1 ) CALL lim_itd_th_rem( 1, jpl, kt ) 411 ! 412 CALL lim_var_glo2eqv ! only for info 413 CALL lim_var_agg(1) 422 IF( jpl > 1 ) CALL lim_itd_th_rem( 1, jpl, kt ) 414 423 415 424 IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limitd_th_rem', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 425 416 426 !------------------------------------------------------------------------------| 417 427 ! 7) Add frazil ice growing in leads. 418 428 !------------------------------------------------------------------------------| 419 429 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limthd_lac', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 430 420 431 CALL lim_thd_lac 421 CALL lim_var_glo2eqv ! only for info422 432 423 ! conservation test424 433 IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limthd_lac', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 425 434 426 IF(ln_ctl) THEN ! Control print 435 ! Control print 436 IF(ln_ctl) THEN 437 CALL lim_var_glo2eqv 438 427 439 CALL prt_ctl_info(' ') 428 440 CALL prt_ctl_info(' - Cell values : ') … … 503 515 REAL(wp) :: zhi_bef ! ice thickness before thermo 504 516 REAL(wp) :: zdh_mel, zda_mel ! net melting 505 REAL(wp) :: zv ! ice volume517 REAL(wp) :: zvi, zvs ! ice/snow volumes 506 518 507 519 DO ji = kideb, kiut 508 520 zdh_mel = MIN( 0._wp, dh_i_surf(ji) + dh_i_bott(ji) + dh_snowice(ji) ) 509 IF( zdh_mel < 0._wp ) THEN 510 zv = a_i_1d(ji) * ht_i_1d(ji) 521 IF( zdh_mel < 0._wp .AND. a_i_1d(ji) > 0._wp ) THEN 522 zvi = a_i_1d(ji) * ht_i_1d(ji) 523 zvs = a_i_1d(ji) * ht_s_1d(ji) 511 524 ! lateral melting = concentration change 512 525 zhi_bef = ht_i_1d(ji) - zdh_mel 513 zda_mel = a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi10 ) ) 514 a_i_1d(ji) = MAX( 0._wp, a_i_1d(ji) + zda_mel ) 515 ! adjust thickness 516 rswitch = MAX( 0._wp , SIGN( 1._wp , a_i_1d(ji) - epsi20 ) ) 517 ht_i_1d(ji) = rswitch * zv / MAX( a_i_1d(ji), epsi20 ) 526 rswitch = MAX( 0._wp , SIGN( 1._wp , zhi_bef - epsi20 ) ) 527 zda_mel = rswitch * a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi20 ) ) 528 a_i_1d(ji) = MAX( epsi20, a_i_1d(ji) + zda_mel ) 529 ! adjust thickness 530 ht_i_1d(ji) = zvi / a_i_1d(ji) 531 ht_s_1d(ji) = zvs / a_i_1d(ji) 518 532 ! retrieve total concentration 519 533 at_i_1d(ji) = a_i_1d(ji) … … 601 615 CALL tab_2d_1d( nbpb, hfx_err_1d (1:nbpb), hfx_err , jpi, jpj, npb(1:nbpb) ) 602 616 CALL tab_2d_1d( nbpb, hfx_res_1d (1:nbpb), hfx_res , jpi, jpj, npb(1:nbpb) ) 617 CALL tab_2d_1d( nbpb, hfx_err_dif_1d (1:nbpb), hfx_err_dif , jpi, jpj, npb(1:nbpb) ) 603 618 CALL tab_2d_1d( nbpb, hfx_err_rem_1d (1:nbpb), hfx_err_rem , jpi, jpj, npb(1:nbpb) ) 604 619 … … 651 666 CALL tab_1d_2d( nbpb, hfx_res , npb, hfx_res_1d(1:nbpb) , jpi, jpj ) 652 667 CALL tab_1d_2d( nbpb, hfx_err_rem , npb, hfx_err_rem_1d(1:nbpb), jpi, jpj ) 668 CALL tab_1d_2d( nbpb, hfx_err_dif , npb, hfx_err_dif_1d(1:nbpb), jpi, jpj ) 653 669 ! 654 670 CALL tab_1d_2d( nbpb, qns_ice(:,:,jl), npb, qns_ice_1d(1:nbpb) , jpi, jpj) … … 674 690 INTEGER :: ios ! Local integer output status for namelist read 675 691 NAMELIST/namicethd/ rn_hnewice, ln_frazil, rn_maxfrazb, rn_vfrazb, rn_Cfrazb, & 676 & rn_himin, parsub,rn_betas, rn_kappa_i, nn_conv_dif, rn_terr_dif, nn_ice_thcon, &677 & nn_monocat 692 & rn_himin, rn_betas, rn_kappa_i, nn_conv_dif, rn_terr_dif, nn_ice_thcon, & 693 & nn_monocat, ln_it_qnsice 678 694 !!------------------------------------------------------------------- 679 695 ! … … 698 714 ENDIF 699 715 700 IF( lk_cpl .AND. parsub /= 0.0 ) CALL ctl_stop( 'In coupled mode, use parsub = 0. or send dqla' )701 716 ! 702 717 IF(lwp) THEN ! control print … … 710 725 WRITE(numout,*)' minimum ice thickness rn_himin = ', rn_himin 711 726 WRITE(numout,*)' numerical carac. of the scheme for diffusion in ice ' 712 WRITE(numout,*)' switch for snow sublimation (=1) or not (=0) parsub = ', parsub713 727 WRITE(numout,*)' coefficient for ice-lead partition of snowfall rn_betas = ', rn_betas 714 728 WRITE(numout,*)' extinction radiation parameter in sea ice rn_kappa_i = ', rn_kappa_i … … 718 732 WRITE(numout,*)' check heat conservation in the ice/snow con_i = ', con_i 719 733 WRITE(numout,*)' virtual ITD mono-category parameterizations (1) or not nn_monocat = ', nn_monocat 734 WRITE(numout,*)' iterate the surface non-solar flux (T) or not (F) ln_it_qnsice = ', ln_it_qnsice 720 735 ENDIF 721 736 ! -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
r5134 r5350 86 86 REAL(wp) :: zsstK ! SST in Kelvin 87 87 88 REAL(wp), POINTER, DIMENSION(:) :: zh_s ! snow layer thickness89 88 REAL(wp), POINTER, DIMENSION(:) :: zqprec ! energy of fallen snow (J.m-3) 90 89 REAL(wp), POINTER, DIMENSION(:) :: zq_su ! heat for surface ablation (J.m-2) … … 92 91 REAL(wp), POINTER, DIMENSION(:) :: zq_rema ! remaining heat at the end of the routine (J.m-2) 93 92 REAL(wp), POINTER, DIMENSION(:) :: zf_tt ! Heat budget to determine melting or freezing(W.m-2) 94 INTEGER , POINTER, DIMENSION(:) :: icount ! number of layers vanished by melting95 93 96 94 REAL(wp), POINTER, DIMENSION(:) :: zdh_s_mel ! snow melt … … 100 98 REAL(wp), POINTER, DIMENSION(:,:) :: zdeltah 101 99 REAL(wp), POINTER, DIMENSION(:,:) :: zh_i ! ice layer thickness 100 INTEGER , POINTER, DIMENSION(:,:) :: icount ! number of layers vanished by melting 102 101 103 102 REAL(wp), POINTER, DIMENSION(:) :: zqh_i ! total ice heat content (J.m-2) … … 118 117 END SELECT 119 118 120 CALL wrk_alloc( jpij, z h_s, zqprec, zq_su, zq_bo, zf_tt, zq_rema )119 CALL wrk_alloc( jpij, zqprec, zq_su, zq_bo, zf_tt, zq_rema ) 121 120 CALL wrk_alloc( jpij, zdh_s_mel, zdh_s_pre, zdh_s_sub, zqh_i, zqh_s, zq_s ) 122 CALL wrk_alloc( jpij, nlay_i +1, zdeltah, zh_i )123 CALL wrk_alloc( jpij, icount )121 CALL wrk_alloc( jpij, nlay_i, zdeltah, zh_i ) 122 CALL wrk_alloc( jpij, nlay_i, icount ) 124 123 125 124 dh_i_surf (:) = 0._wp ; dh_i_bott (:) = 0._wp ; dh_snowice(:) = 0._wp … … 129 128 zq_rema(:) = 0._wp 130 129 131 zh_s (:) = 0._wp132 130 zdh_s_pre(:) = 0._wp 133 131 zdh_s_mel(:) = 0._wp … … 138 136 zh_i (:,:) = 0._wp 139 137 zdeltah (:,:) = 0._wp 140 icount (:) = 0 138 icount (:,:) = 0 139 140 ! Initialize enthalpy at nlay_i+1 141 DO ji = kideb, kiut 142 q_i_1d(ji,nlay_i+1) = 0._wp 143 END DO 141 144 142 145 ! initialize layer thicknesses and enthalpies … … 155 158 ! 156 159 DO ji = kideb, kiut 157 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - ht_s_1d(ji) ) )158 ztmelts = rswitch * rt0 + ( 1._wp - rswitch ) * rt0159 160 160 zfdum = qns_ice_1d(ji) + ( 1._wp - i0(ji) ) * qsr_ice_1d(ji) - fc_su(ji) 161 161 zf_tt(ji) = fc_bo_i(ji) + fhtur_1d(ji) + fhld_1d(ji) 162 162 163 zq_su (ji) = MAX( 0._wp, zfdum * rdt_ice ) * MAX( 0._wp , SIGN( 1._wp, t_su_1d(ji) - ztmelts) )163 zq_su (ji) = MAX( 0._wp, zfdum * rdt_ice ) * MAX( 0._wp , SIGN( 1._wp, t_su_1d(ji) - rt0 ) ) 164 164 zq_bo (ji) = MAX( 0._wp, zf_tt(ji) * rdt_ice ) 165 165 END DO … … 187 187 !------------------------------------------------------------! 188 188 ! 189 DO ji = kideb, kiut190 zh_s(ji) = ht_s_1d(ji) * r1_nlay_s191 END DO192 !193 189 DO jk = 1, nlay_s 194 190 DO ji = kideb, kiut 195 zqh_s(ji) = zqh_s(ji) + q_s_1d(ji,jk) * zh_s(ji)191 zqh_s(ji) = zqh_s(ji) + q_s_1d(ji,jk) * ht_s_1d(ji) * r1_nlay_s 196 192 END DO 197 193 END DO … … 222 218 ! Martin Vancoppenolle, December 2006 223 219 220 zdeltah(:,:) = 0._wp 224 221 DO ji = kideb, kiut 225 222 !----------- … … 236 233 ! mass flux, <0 237 234 wfx_spr_1d(ji) = wfx_spr_1d(ji) - rhosn * a_i_1d(ji) * zdh_s_pre(ji) * r1_rdtice 238 ! update thickness239 ht_s_1d (ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_pre(ji) )240 235 241 236 !--------------------- … … 243 238 !--------------------- 244 239 ! thickness change 245 IF( zdh_s_pre(ji) > 0._wp ) THEN246 240 rswitch = MAX( 0._wp , SIGN( 1._wp , zqprec(ji) - epsi20 ) ) 247 zd h_s_mel (ji) = - rswitch * zq_su(ji) / MAX( zqprec(ji) , epsi20 )248 zd h_s_mel (ji) = MAX( - zdh_s_pre(ji), zdh_s_mel(ji) ) ! bound melting241 zdeltah (ji,1) = - rswitch * zq_su(ji) / MAX( zqprec(ji) , epsi20 ) 242 zdeltah (ji,1) = MAX( - zdh_s_pre(ji), zdeltah(ji,1) ) ! bound melting 249 243 ! heat used to melt snow (W.m-2, >0) 250 hfx_snw_1d(ji) = hfx_snw_1d(ji) - zd h_s_mel(ji) * a_i_1d(ji) * zqprec(ji) * r1_rdtice244 hfx_snw_1d(ji) = hfx_snw_1d(ji) - zdeltah(ji,1) * a_i_1d(ji) * zqprec(ji) * r1_rdtice 251 245 ! snow melting only = water into the ocean (then without snow precip), >0 252 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdh_s_mel(ji) * r1_rdtice 253 254 ! updates available heat + thickness 255 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdh_s_mel(ji) * zqprec(ji) ) 256 ht_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_mel(ji) ) 257 zh_s (ji) = ht_s_1d(ji) * r1_nlay_s 258 259 ENDIF 260 END DO 261 262 ! If heat still available, then melt more snow 263 zdeltah(:,:) = 0._wp ! important 246 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 247 ! updates available heat + precipitations after melting 248 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdeltah(ji,1) * zqprec(ji) ) 249 zdh_s_pre (ji) = zdh_s_pre(ji) + zdeltah(ji,1) 250 251 ! update thickness 252 ht_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_pre(ji) ) 253 END DO 254 255 ! If heat still available (zq_su > 0), then melt more snow 256 zdeltah(:,:) = 0._wp 264 257 DO jk = 1, nlay_s 265 258 DO ji = kideb, kiut … … 268 261 rswitch = rswitch * ( MAX( 0._wp, SIGN( 1._wp, q_s_1d(ji,jk) - epsi20 ) ) ) 269 262 zdeltah (ji,jk) = - rswitch * zq_su(ji) / MAX( q_s_1d(ji,jk), epsi20 ) 270 zdeltah (ji,jk) = MAX( zdeltah(ji,jk) , - zh_s(ji) ) ! bound melting263 zdeltah (ji,jk) = MAX( zdeltah(ji,jk) , - ht_s_1d(ji) ) ! bound melting 271 264 zdh_s_mel(ji) = zdh_s_mel(ji) + zdeltah(ji,jk) 272 265 ! heat used to melt snow(W.m-2, >0) … … 274 267 ! snow melting only = water into the ocean (then without snow precip) 275 268 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 276 277 269 ! updates available heat + thickness 278 270 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdeltah(ji,jk) * q_s_1d(ji,jk) ) 279 271 ht_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdeltah(ji,jk) ) 280 281 272 END DO 282 273 END DO … … 286 277 !---------------------- 287 278 ! qla_ice is always >=0 (upwards), heat goes to the atmosphere, therefore snow sublimates 288 ! clem comment: not counted in mass exchange in limsbc since this is an exchange with atm. (not ocean)279 ! clem comment: not counted in mass/heat exchange in limsbc since this is an exchange with atm. (not ocean) 289 280 ! clem comment: ice should also sublimate 281 zdeltah(:,:) = 0._wp 290 282 IF( lk_cpl ) THEN 291 283 ! coupled mode: sublimation already included in emp_ice (to do in limsbc_ice) … … 294 286 ! forced mode: snow thickness change due to sublimation 295 287 DO ji = kideb, kiut 296 zdh_s_sub(ji) = MAX( - ht_s_1d(ji) , - parsub *qla_ice_1d(ji) / ( rhosn * lsub ) * rdt_ice )288 zdh_s_sub(ji) = MAX( - ht_s_1d(ji) , - qla_ice_1d(ji) / ( rhosn * lsub ) * rdt_ice ) 297 289 ! Heat flux by sublimation [W.m-2], < 0 298 290 ! sublimate first snow that had fallen, then pre-existing snow 299 zcoeff = ( MAX( zdh_s_sub(ji), - MAX( 0._wp, zdh_s_pre(ji) + zdh_s_mel(ji) ) ) * zqprec(ji) + & 300 & ( zdh_s_sub(ji) - MAX( zdh_s_sub(ji), - MAX( 0._wp, zdh_s_pre(ji) + zdh_s_mel(ji) ) ) ) * q_s_1d(ji,1) ) & 301 & * a_i_1d(ji) * r1_rdtice 302 hfx_sub_1d(ji) = hfx_sub_1d(ji) + zcoeff 291 zdeltah(ji,1) = MAX( zdh_s_sub(ji), - zdh_s_pre(ji) ) 292 hfx_sub_1d(ji) = hfx_sub_1d(ji) + ( zdeltah(ji,1) * zqprec(ji) + ( zdh_s_sub(ji) - zdeltah(ji,1) ) * q_s_1d(ji,1) & 293 & ) * a_i_1d(ji) * r1_rdtice 303 294 ! Mass flux by sublimation 304 295 wfx_sub_1d(ji) = wfx_sub_1d(ji) - rhosn * a_i_1d(ji) * zdh_s_sub(ji) * r1_rdtice 305 296 ! new snow thickness 306 ht_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_sub(ji) ) 297 ht_s_1d(ji) = MAX( 0._wp , ht_s_1d(ji) + zdh_s_sub(ji) ) 298 ! update precipitations after sublimation and correct sublimation 299 zdh_s_pre(ji) = zdh_s_pre(ji) + zdeltah(ji,1) 300 zdh_s_sub(ji) = zdh_s_sub(ji) - zdeltah(ji,1) 307 301 END DO 308 302 ENDIF … … 310 304 ! --- Update snow diags --- ! 311 305 DO ji = kideb, kiut 312 dh_s_tot(ji) = zdh_s_mel(ji) + zdh_s_pre(ji) + zdh_s_sub(ji) 313 zh_s(ji) = ht_s_1d(ji) * r1_nlay_s 314 END DO ! ji 306 dh_s_tot(ji) = zdh_s_mel(ji) + zdh_s_pre(ji) + zdh_s_sub(ji) 307 END DO 315 308 316 309 !------------------------------------------- … … 323 316 rswitch = MAX( 0._wp , SIGN( 1._wp, ht_s_1d(ji) - epsi20 ) ) 324 317 q_s_1d(ji,jk) = rswitch / MAX( ht_s_1d(ji), epsi20 ) * & 325 & ( ( MAX( 0._wp, dh_s_tot(ji) )) * zqprec(ji) + &326 & ( - MAX( 0._wp, dh_s_tot(ji) ) + ht_s_1d(ji) ) * rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) )318 & ( ( zdh_s_pre(ji) ) * zqprec(ji) + & 319 & ( ht_s_1d(ji) - zdh_s_pre(ji) ) * rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) ) 327 320 zq_s(ji) = zq_s(ji) + q_s_1d(ji,jk) 328 321 END DO … … 334 327 zdeltah(:,:) = 0._wp ! important 335 328 DO jk = 1, nlay_i 336 DO ji = kideb, kiut 337 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of layer k [J/kg, <0] 338 339 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 ! Melting point of layer k [K] 340 341 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of resulting meltwater [J/kg, <0] 342 343 zdE = zEi - zEw ! Specific enthalpy difference < 0 344 345 zfmdt = - zq_su(ji) / zdE ! Mass flux to the ocean [kg/m2, >0] 346 347 zdeltah(ji,jk) = - zfmdt * r1_rhoic ! Melt of layer jk [m, <0] 348 349 zdeltah(ji,jk) = MIN( 0._wp , MAX( zdeltah(ji,jk) , - zh_i(ji,jk) ) ) ! Melt of layer jk cannot exceed the layer thickness [m, <0] 350 351 zq_su(ji) = MAX( 0._wp , zq_su(ji) - zdeltah(ji,jk) * rhoic * zdE ) ! update available heat 352 353 dh_i_surf(ji) = dh_i_surf(ji) + zdeltah(ji,jk) ! Cumulate surface melt 354 355 zfmdt = - rhoic * zdeltah(ji,jk) ! Recompute mass flux [kg/m2, >0] 356 357 zQm = zfmdt * zEw ! Energy of the melt water sent to the ocean [J/m2, <0] 358 359 ! Contribution to salt flux (clem: using sm_i_1d and not s_i_1d(jk) is ok) 360 sfx_sum_1d(ji) = sfx_sum_1d(ji) - sm_i_1d(ji) * a_i_1d(ji) * zdeltah(ji,jk) * rhoic * r1_rdtice 361 362 ! Contribution to heat flux [W.m-2], < 0 363 hfx_thd_1d(ji) = hfx_thd_1d(ji) + zfmdt * a_i_1d(ji) * zEw * r1_rdtice 364 365 ! Total heat flux used in this process [W.m-2], > 0 366 hfx_sum_1d(ji) = hfx_sum_1d(ji) - zfmdt * a_i_1d(ji) * zdE * r1_rdtice 367 368 ! Contribution to mass flux 369 wfx_sum_1d(ji) = wfx_sum_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 370 329 DO ji = kideb, kiut 330 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 ! Melting point of layer k [K] 331 332 IF( t_i_1d(ji,jk) >= ztmelts ) THEN !!! Internal melting 333 334 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of layer k [J/kg, <0] 335 zdE = 0._wp ! Specific enthalpy difference (J/kg, <0) 336 ! set up at 0 since no energy is needed to melt water...(it is already melted) 337 zdeltah(ji,jk) = MIN( 0._wp , - zh_i(ji,jk) ) ! internal melting occurs when the internal temperature is above freezing 338 ! this should normally not happen, but sometimes, heat diffusion leads to this 339 zfmdt = - zdeltah(ji,jk) * rhoic ! Mass flux x time step > 0 340 341 dh_i_surf(ji) = dh_i_surf(ji) + zdeltah(ji,jk) ! Cumulate surface melt 342 343 zfmdt = - rhoic * zdeltah(ji,jk) ! Recompute mass flux [kg/m2, >0] 344 345 ! Contribution to heat flux to the ocean [W.m-2], <0 (ice enthalpy zEi is "sent" to the ocean) 346 hfx_res_1d(ji) = hfx_res_1d(ji) + zfmdt * a_i_1d(ji) * zEi * r1_rdtice 347 348 ! Contribution to salt flux (clem: using sm_i_1d and not s_i_1d(jk) is ok) 349 sfx_res_1d(ji) = sfx_res_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * sm_i_1d(ji) * r1_rdtice 350 351 ! Contribution to mass flux 352 wfx_res_1d(ji) = wfx_res_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 353 354 ELSE !!! Surface melting 355 356 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of layer k [J/kg, <0] 357 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of resulting meltwater [J/kg, <0] 358 zdE = zEi - zEw ! Specific enthalpy difference < 0 359 360 zfmdt = - zq_su(ji) / zdE ! Mass flux to the ocean [kg/m2, >0] 361 362 zdeltah(ji,jk) = - zfmdt * r1_rhoic ! Melt of layer jk [m, <0] 363 364 zdeltah(ji,jk) = MIN( 0._wp , MAX( zdeltah(ji,jk) , - zh_i(ji,jk) ) ) ! Melt of layer jk cannot exceed the layer thickness [m, <0] 365 366 zq_su(ji) = MAX( 0._wp , zq_su(ji) - zdeltah(ji,jk) * rhoic * zdE ) ! update available heat 367 368 dh_i_surf(ji) = dh_i_surf(ji) + zdeltah(ji,jk) ! Cumulate surface melt 369 370 zfmdt = - rhoic * zdeltah(ji,jk) ! Recompute mass flux [kg/m2, >0] 371 372 zQm = zfmdt * zEw ! Energy of the melt water sent to the ocean [J/m2, <0] 373 374 ! Contribution to salt flux (clem: using sm_i_1d and not s_i_1d(jk) is ok) 375 sfx_sum_1d(ji) = sfx_sum_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * sm_i_1d(ji) * r1_rdtice 376 377 ! Contribution to heat flux [W.m-2], < 0 378 hfx_thd_1d(ji) = hfx_thd_1d(ji) + zfmdt * a_i_1d(ji) * zEw * r1_rdtice 379 380 ! Total heat flux used in this process [W.m-2], > 0 381 hfx_sum_1d(ji) = hfx_sum_1d(ji) - zfmdt * a_i_1d(ji) * zdE * r1_rdtice 382 383 ! Contribution to mass flux 384 wfx_sum_1d(ji) = wfx_sum_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 385 386 END IF 371 387 ! record which layers have disappeared (for bottom melting) 372 388 ! => icount=0 : no layer has vanished 373 389 ! => icount=5 : 5 layers have vanished 374 rswitch = MAX( 0._wp , SIGN( 1._wp , - ( zh_i(ji,jk) + zdeltah(ji,jk) ) ) )375 icount(ji ) = icount(ji) +NINT( rswitch )376 zh_i(ji,jk) = MAX( 0._wp , zh_i(ji,jk) + zdeltah(ji,jk) )390 rswitch = MAX( 0._wp , SIGN( 1._wp , - ( zh_i(ji,jk) + zdeltah(ji,jk) ) ) ) 391 icount(ji,jk) = NINT( rswitch ) 392 zh_i(ji,jk) = MAX( 0._wp , zh_i(ji,jk) + zdeltah(ji,jk) ) 377 393 378 394 ! update heat content (J.m-2) and layer thickness … … 405 421 ! -> need for an iterative procedure, which converges quickly 406 422 407 IF ( nn_icesal == 2 ) THEN 408 num_iter_max = 5 409 ELSE 410 num_iter_max = 1 411 ENDIF 412 413 ! Just to be sure that enthalpy at nlay_i+1 is null 414 DO ji = kideb, kiut 415 q_i_1d(ji,nlay_i+1) = 0._wp 416 END DO 423 num_iter_max = 1 424 IF( nn_icesal == 2 ) num_iter_max = 5 417 425 418 426 ! Iterative procedure … … 483 491 484 492 ! Contribution to salt flux, <0 485 sfx_bog_1d(ji) = sfx_bog_1d(ji) + s_i_new(ji) * a_i_1d(ji) * zfmdt* r1_rdtice493 sfx_bog_1d(ji) = sfx_bog_1d(ji) - rhoic * a_i_1d(ji) * dh_i_bott(ji) * s_i_new(ji) * r1_rdtice 486 494 487 495 ! Contribution to mass flux, <0 … … 500 508 DO jk = nlay_i, 1, -1 501 509 DO ji = kideb, kiut 502 IF( zf_tt(ji) > = 0._wp .AND. jk > icount(ji) ) THEN ! do not calculate where layer has already disappeared by surface melting510 IF( zf_tt(ji) > 0._wp .AND. jk > icount(ji,jk) ) THEN ! do not calculate where layer has already disappeared by surface melting 503 511 504 512 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 ! Melting point of layer jk (K) … … 507 515 508 516 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of melting ice (J/kg, <0) 509 510 !!zEw = rcp * ( t_i_1d(ji,jk) - rt0 ) ! Specific enthalpy of meltwater at T = t_i_1d (J/kg, <0)511 512 517 zdE = 0._wp ! Specific enthalpy difference (J/kg, <0) 513 518 ! set up at 0 since no energy is needed to melt water...(it is already melted) 514 515 zdeltah (ji,jk) = MIN( 0._wp , - zh_i(ji,jk) ) ! internal melting occurs when the internal temperature is above freezing 516 ! this should normally not happen, but sometimes, heat diffusion leads to this 519 zdeltah (ji,jk) = MIN( 0._wp , - zh_i(ji,jk) ) ! internal melting occurs when the internal temperature is above freezing 520 ! this should normally not happen, but sometimes, heat diffusion leads to this 517 521 518 522 dh_i_bott (ji) = dh_i_bott(ji) + zdeltah(ji,jk) 519 523 520 zfmdt = - zdeltah(ji,jk) * rhoic 524 zfmdt = - zdeltah(ji,jk) * rhoic ! Mass flux x time step > 0 521 525 522 526 ! Contribution to heat flux to the ocean [W.m-2], <0 (ice enthalpy zEi is "sent" to the ocean) … … 524 528 525 529 ! Contribution to salt flux (clem: using sm_i_1d and not s_i_1d(jk) is ok) 526 sfx_res_1d(ji) = sfx_res_1d(ji) - sm_i_1d(ji) * a_i_1d(ji) * zdeltah(ji,jk) * rhoic* r1_rdtice530 sfx_res_1d(ji) = sfx_res_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * sm_i_1d(ji) * r1_rdtice 527 531 528 532 ! Contribution to mass flux … … 535 539 ELSE !!! Basal melting 536 540 537 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of melting ice (J/kg, <0) 538 539 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of meltwater (J/kg, <0) 540 541 zdE = zEi - zEw ! Specific enthalpy difference (J/kg, <0) 542 543 zfmdt = - zq_bo(ji) / zdE ! Mass flux x time step (kg/m2, >0) 544 545 zdeltah(ji,jk) = - zfmdt * r1_rhoic ! Gross thickness change 546 547 zdeltah(ji,jk) = MIN( 0._wp , MAX( zdeltah(ji,jk), - zh_i(ji,jk) ) ) ! bound thickness change 541 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of melting ice (J/kg, <0) 542 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of meltwater (J/kg, <0) 543 zdE = zEi - zEw ! Specific enthalpy difference (J/kg, <0) 544 545 zfmdt = - zq_bo(ji) / zdE ! Mass flux x time step (kg/m2, >0) 546 547 zdeltah(ji,jk) = - zfmdt * r1_rhoic ! Gross thickness change 548 549 zdeltah(ji,jk) = MIN( 0._wp , MAX( zdeltah(ji,jk), - zh_i(ji,jk) ) ) ! bound thickness change 548 550 549 zq_bo(ji) 550 551 dh_i_bott(ji) 552 553 zfmdt 554 555 zQm 551 zq_bo(ji) = MAX( 0._wp , zq_bo(ji) - zdeltah(ji,jk) * rhoic * zdE ) ! update available heat. MAX is necessary for roundup errors 552 553 dh_i_bott(ji) = dh_i_bott(ji) + zdeltah(ji,jk) ! Update basal melt 554 555 zfmdt = - zdeltah(ji,jk) * rhoic ! Mass flux x time step > 0 556 557 zQm = zfmdt * zEw ! Heat exchanged with ocean 556 558 557 559 ! Contribution to heat flux to the ocean [W.m-2], <0 558 hfx_thd_1d(ji) = hfx_thd_1d(ji) + zfmdt * a_i_1d(ji) * zEw * r1_rdtice560 hfx_thd_1d(ji) = hfx_thd_1d(ji) + zfmdt * a_i_1d(ji) * zEw * r1_rdtice 559 561 560 562 ! Contribution to salt flux (clem: using sm_i_1d and not s_i_1d(jk) is ok) 561 sfx_bom_1d(ji) = sfx_bom_1d(ji) - sm_i_1d(ji) * a_i_1d(ji) * zdeltah(ji,jk) * rhoic* r1_rdtice563 sfx_bom_1d(ji) = sfx_bom_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * sm_i_1d(ji) * r1_rdtice 562 564 563 565 ! Total heat flux used in this process [W.m-2], >0 564 hfx_bom_1d(ji) = hfx_bom_1d(ji) - zfmdt * a_i_1d(ji) * zdE * r1_rdtice566 hfx_bom_1d(ji) = hfx_bom_1d(ji) - zfmdt * a_i_1d(ji) * zdE * r1_rdtice 565 567 566 568 ! Contribution to mass flux 567 wfx_bom_1d(ji) = wfx_bom_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice569 wfx_bom_1d(ji) = wfx_bom_1d(ji) - rhoic * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 568 570 569 571 ! update heat content (J.m-2) and layer thickness … … 595 597 zdeltah (ji,1) = - rswitch * zq_rema(ji) / MAX( q_s_1d(ji,1), epsi20 ) 596 598 zdeltah (ji,1) = MIN( 0._wp , MAX( zdeltah(ji,1) , - ht_s_1d(ji) ) ) ! bound melting 597 zdh_s_mel(ji) = zdh_s_mel(ji) + zdeltah(ji,1)598 599 dh_s_tot (ji) = dh_s_tot(ji) + zdeltah(ji,1) 599 600 ht_s_1d (ji) = ht_s_1d(ji) + zdeltah(ji,1) … … 622 623 dh_snowice(ji) = MAX( 0._wp , ( rhosn * ht_s_1d(ji) + (rhoic-rau0) * ht_i_1d(ji) ) / ( rhosn+rau0-rhoic ) ) 623 624 624 ht_i_1d(ji) 625 ht_s_1d(ji) 625 ht_i_1d(ji) = ht_i_1d(ji) + dh_snowice(ji) 626 ht_s_1d(ji) = ht_s_1d(ji) - dh_snowice(ji) 626 627 627 628 ! Salinity of snow ice … … 669 670 ! Update temperature, energy 670 671 !------------------------------------------- 671 !clem bug: we should take snow into account here672 672 DO ji = kideb, kiut 673 673 rswitch = 1.0 - MAX( 0._wp , SIGN( 1._wp , - ht_i_1d(ji) ) ) … … 688 688 WHERE( ht_i_1d == 0._wp ) a_i_1d = 0._wp 689 689 690 CALL wrk_dealloc( jpij, z h_s, zqprec, zq_su, zq_bo, zf_tt, zq_rema )690 CALL wrk_dealloc( jpij, zqprec, zq_su, zq_bo, zf_tt, zq_rema ) 691 691 CALL wrk_dealloc( jpij, zdh_s_mel, zdh_s_pre, zdh_s_sub, zqh_i, zqh_s, zq_s ) 692 CALL wrk_dealloc( jpij, nlay_i +1, zdeltah, zh_i )693 CALL wrk_dealloc( jpij, icount )692 CALL wrk_dealloc( jpij, nlay_i, zdeltah, zh_i ) 693 CALL wrk_dealloc( jpij, nlay_i, icount ) 694 694 ! 695 695 ! -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
r5128 r5350 120 120 REAL(wp), POINTER, DIMENSION(:) :: zh_s ! snow layer thickness 121 121 REAL(wp), POINTER, DIMENSION(:) :: zfsw ! solar radiation absorbed at the surface 122 REAL(wp), POINTER, DIMENSION(:) :: zqns_ice_b ! solar radiation absorbed at the surface 122 123 REAL(wp), POINTER, DIMENSION(:) :: zf ! surface flux function 123 124 REAL(wp), POINTER, DIMENSION(:) :: dzf ! derivative of the surface flux function … … 168 169 CALL wrk_alloc( jpij, numeqmin, numeqmax ) 169 170 CALL wrk_alloc( jpij, isnow, ztsub, ztsubit, zh_i, zh_s, zfsw ) 170 CALL wrk_alloc( jpij, zf, dzf, z errit, zdifcase, zftrice, zihic, zghe )171 CALL wrk_alloc( jpij, nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart=0)172 CALL wrk_alloc( jpij, nlay_s+1, zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart=0)173 CALL wrk_alloc( jpij, 174 CALL wrk_alloc( jpij, nlay_i+3,3, ztrid )171 CALL wrk_alloc( jpij, zf, dzf, zqns_ice_b, zerrit, zdifcase, zftrice, zihic, zghe ) 172 CALL wrk_alloc( jpij,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart=0 ) 173 CALL wrk_alloc( jpij,nlay_s+1, zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart=0 ) 174 CALL wrk_alloc( jpij,nlay_i+3, zindterm, zindtbis, zdiagbis ) 175 CALL wrk_alloc( jpij,nlay_i+3,3, ztrid ) 175 176 176 177 CALL wrk_alloc( jpij, zdq, zq_ini, zhfx_err ) … … 242 243 !------------------------------------------------------- 243 244 DO ji = kideb , kiut 244 zfsw (ji) = qsr_ice_1d(ji) * ( 1 - i0(ji) ) ! Shortwave radiation absorbed at surface 245 zftrice(ji) = qsr_ice_1d(ji) * i0(ji) ! Solar radiation transmitted below the surface layer 246 dzf (ji) = dqns_ice_1d(ji) ! derivative of incoming nonsolar flux 245 zfsw (ji) = qsr_ice_1d(ji) * ( 1 - i0(ji) ) ! Shortwave radiation absorbed at surface 246 zftrice(ji) = qsr_ice_1d(ji) * i0(ji) ! Solar radiation transmitted below the surface layer 247 dzf (ji) = dqns_ice_1d(ji) ! derivative of incoming nonsolar flux 248 zqns_ice_b(ji) = qns_ice_1d(ji) ! store previous qns_ice_1d value 247 249 END DO 248 250 … … 452 454 !------------------------------------------------------------------------------| 453 455 ! 454 IF ( .NOT. lk_cpl ) THEN !--- forced atmosphere case456 IF ( ln_it_qnsice ) THEN 455 457 DO ji = kideb , kiut 456 458 ! update of the non solar flux according to the update in T_su … … 677 679 END DO 678 680 679 DO numeq = nlay_i + nlay_s + 1, nlay_s + 2, -1681 DO numeq = nlay_i + nlay_s, nlay_s + 2, -1 680 682 DO ji = kideb , kiut 681 683 jk = numeq - nlay_s - 1 … … 757 759 CALL lim_thd_enmelt( kideb, kiut ) 758 760 761 ! --- diagnose the change in non-solar flux due to surface temperature change --- ! 762 IF ( ln_it_qnsice ) hfx_err_dif_1d(:) = hfx_err_dif_1d(:) - ( qns_ice_1d(:) - zqns_ice_b(:) ) * a_i_1d(:) 759 763 760 764 ! --- diag conservation imbalance on heat diffusion - PART 2 --- ! … … 768 772 ENDIF 769 773 hfx_err_1d(ji) = hfx_err_1d(ji) + zhfx_err(ji) * a_i_1d(ji) 774 775 ! total heat that is sent to the ocean (i.e. not used in the heat diffusion equation) 776 hfx_err_dif_1d(ji) = hfx_err_dif_1d(ji) + zhfx_err(ji) * a_i_1d(ji) 770 777 END DO 771 772 ! diagnose external surface (forced case) or bottom (forced case) from heat conservation773 IF( .NOT. lk_cpl ) THEN ! --- forced case: qns_ice and fc_su are diagnosed774 !775 DO ji = kideb, kiut776 qns_ice_1d(ji) = qns_ice_1d(ji) - zhfx_err(ji)777 fc_su (ji) = fc_su(ji) - zhfx_err(ji)778 END DO779 !780 ELSE ! --- coupled case: ocean turbulent heat flux is diagnosed781 !782 DO ji = kideb, kiut783 fhtur_1d (ji) = fhtur_1d(ji) - zhfx_err(ji)784 END DO785 !786 ENDIF787 778 788 779 !----------------------------------------- … … 797 788 & ( fc_su(ji) + i0(ji) * qsr_ice_1d(ji) - zradtr_i(ji,nlay_i) - fc_bo_i(ji) ) * a_i_1d(ji) 798 789 ENDIF 799 END DO 800 801 ! --- compute diagnostic net heat flux at the surface of the snow-ice system (W.m-2) 802 DO ji = kideb, kiut 803 ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 804 hfx_in (ii,ij) = hfx_in (ii,ij) + a_i_1d(ji) * ( qsr_ice_1d(ji) + qns_ice_1d(ji) ) 805 END DO 806 790 ! correction on the diagnosed heat flux due to non-convergence of the algorithm used to solve heat equation 791 hfx_dif_1d(ji) = hfx_dif_1d(ji) - zhfx_err(ji) * a_i_1d(ji) 792 END DO 807 793 ! 808 794 CALL wrk_dealloc( jpij, numeqmin, numeqmax ) 809 795 CALL wrk_dealloc( jpij, isnow, ztsub, ztsubit, zh_i, zh_s, zfsw ) 810 796 CALL wrk_dealloc( jpij, zf, dzf, zerrit, zdifcase, zftrice, zihic, zghe ) 811 CALL wrk_dealloc( jpij, nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, & 812 & ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart = 0 ) 813 CALL wrk_dealloc( jpij, nlay_s+1, zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart = 0 ) 814 CALL wrk_dealloc( jpij, nlay_i+3, zindterm, zindtbis, zdiagbis ) 815 CALL wrk_dealloc( jpij, nlay_i+3, 3, ztrid ) 797 CALL wrk_dealloc( jpij,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart = 0 ) 798 CALL wrk_dealloc( jpij,nlay_s+1, zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart = 0 ) 799 CALL wrk_dealloc( jpij,nlay_i+3, zindterm, zindtbis, zdiagbis ) 800 CALL wrk_dealloc( jpij,nlay_i+3,3, ztrid ) 816 801 CALL wrk_dealloc( jpij, zdq, zq_ini, zhfx_err ) 817 802 … … 834 819 DO jk = 1, nlay_i ! Sea ice energy of melting 835 820 DO ji = kideb, kiut 836 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 837 rswitch = MAX( 0._wp , SIGN( 1._wp , -(t_i_1d(ji,jk) - rt0) - epsi20 ) ) 838 q_i_1d(ji,jk) = rhoic * ( cpic * ( ztmelts - t_i_1d(ji,jk) ) & 839 & + lfus * ( 1.0 - rswitch * ( ztmelts-rt0 ) / MIN( t_i_1d(ji,jk) - rt0, -epsi20 ) ) & 840 & - rcp * ( ztmelts-rt0 ) ) 821 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 822 t_i_1d(ji,jk) = MIN( t_i_1d(ji,jk), ztmelts ) ! Force t_i_1d to be lower than melting point 823 ! (sometimes dif scheme produces abnormally high temperatures) 824 q_i_1d(ji,jk) = rhoic * ( cpic * ( ztmelts - t_i_1d(ji,jk) ) & 825 & + lfus * ( 1.0 - ( ztmelts-rt0 ) / ( t_i_1d(ji,jk) - rt0 ) ) & 826 & - rcp * ( ztmelts-rt0 ) ) 841 827 END DO 842 828 END DO -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
r5134 r5350 31 31 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 32 32 USE limthd_ent 33 USE limvar 33 34 34 35 IMPLICIT NONE … … 105 106 REAL(wp), POINTER, DIMENSION(:,:) :: za_i_1d ! 1-D version of a_i 106 107 REAL(wp), POINTER, DIMENSION(:,:) :: zv_i_1d ! 1-D version of v_i 107 REAL(wp), POINTER, DIMENSION(:,:) :: zoa_i_1d ! 1-D version of oa_i108 108 REAL(wp), POINTER, DIMENSION(:,:) :: zsmv_i_1d ! 1-D version of smv_i 109 109 … … 118 118 CALL wrk_alloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice ) 119 119 CALL wrk_alloc( jpij, zdv_res, zda_res, zat_i_1d, zv_frazb, zvrel_1d ) 120 CALL wrk_alloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, z oa_i_1d, zsmv_i_1d )121 CALL wrk_alloc( jpij,nlay_i +1,jpl, ze_i_1d )120 CALL wrk_alloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, zsmv_i_1d ) 121 CALL wrk_alloc( jpij,nlay_i,jpl, ze_i_1d ) 122 122 CALL wrk_alloc( jpi,jpj, zvrel ) 123 123 124 CALL lim_var_agg(1) 125 CALL lim_var_glo2eqv 124 126 !------------------------------------------------------------------------------| 125 127 ! 2) Convert units for ice internal energy … … 289 291 CALL tab_2d_1d( nbpac, za_i_1d (1:nbpac,jl), a_i (:,:,jl), jpi, jpj, npac(1:nbpac) ) 290 292 CALL tab_2d_1d( nbpac, zv_i_1d (1:nbpac,jl), v_i (:,:,jl), jpi, jpj, npac(1:nbpac) ) 291 CALL tab_2d_1d( nbpac, zoa_i_1d (1:nbpac,jl), oa_i (:,:,jl), jpi, jpj, npac(1:nbpac) )292 293 CALL tab_2d_1d( nbpac, zsmv_i_1d(1:nbpac,jl), smv_i(:,:,jl), jpi, jpj, npac(1:nbpac) ) 293 294 DO jk = 1, nlay_i 294 295 CALL tab_2d_1d( nbpac, ze_i_1d(1:nbpac,jk,jl), e_i(:,:,jk,jl) , jpi, jpj, npac(1:nbpac) ) 295 END DO ! jk296 END DO ! jl296 END DO 297 END DO 297 298 298 299 CALL tab_2d_1d( nbpac, qlead_1d (1:nbpac) , qlead , jpi, jpj, npac(1:nbpac) ) … … 355 356 DO ji = 1, nbpac 356 357 zo_newice(ji) = 0._wp 357 END DO ! ji358 END DO 358 359 359 360 !------------------- … … 477 478 ENDDO 478 479 479 !------------480 ! Update age481 !------------482 DO jl = 1, jpl483 DO ji = 1, nbpac484 rswitch = MAX( 0._wp , SIGN( 1._wp , za_i_1d(ji,jl) - epsi20 ) ) ! 0 if no ice and 1 if yes485 zoa_i_1d(ji,jl) = za_b(ji,jl) * zoa_i_1d(ji,jl) / MAX( za_i_1d(ji,jl) , epsi20 ) * rswitch486 END DO487 END DO488 489 480 !----------------- 490 481 ! Update salinity … … 503 494 CALL tab_1d_2d( nbpac, a_i (:,:,jl), npac(1:nbpac), za_i_1d (1:nbpac,jl), jpi, jpj ) 504 495 CALL tab_1d_2d( nbpac, v_i (:,:,jl), npac(1:nbpac), zv_i_1d (1:nbpac,jl), jpi, jpj ) 505 CALL tab_1d_2d( nbpac, oa_i(:,:,jl), npac(1:nbpac), zoa_i_1d(1:nbpac,jl), jpi, jpj )506 496 CALL tab_1d_2d( nbpac, smv_i (:,:,jl), npac(1:nbpac), zsmv_i_1d(1:nbpac,jl) , jpi, jpj ) 507 497 DO jk = 1, nlay_i … … 535 525 CALL wrk_dealloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice ) 536 526 CALL wrk_dealloc( jpij, zdv_res, zda_res, zat_i_1d, zv_frazb, zvrel_1d ) 537 CALL wrk_dealloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, z oa_i_1d, zsmv_i_1d )538 CALL wrk_dealloc( jpij,nlay_i +1,jpl, ze_i_1d )527 CALL wrk_dealloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, zsmv_i_1d ) 528 CALL wrk_dealloc( jpij,nlay_i,jpl, ze_i_1d ) 539 529 CALL wrk_dealloc( jpi,jpj, zvrel ) 540 530 ! -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
r5134 r5350 80 80 IF( nn_timing == 1 ) CALL timing_start('limtrp') 81 81 82 CALL wrk_alloc( jpi,jpj, zsm, zatold, zeiold, zesold )83 CALL wrk_alloc( jpi,jpj,jpl, z0ice, z0snw, z0ai, z0es , z0smi , z0oi )84 CALL wrk_alloc( jpi,jpj,1, z0opw )85 CALL wrk_alloc( jpi,jpj,nlay_i +1,jpl, z0ei )86 CALL wrk_alloc( jpi,jpj,jpl, zhimax, zviold, zvsold, zsmvold )82 CALL wrk_alloc( jpi,jpj, zsm, zatold, zeiold, zesold ) 83 CALL wrk_alloc( jpi,jpj,jpl, z0ice, z0snw, z0ai, z0es , z0smi , z0oi ) 84 CALL wrk_alloc( jpi,jpj,1, z0opw ) 85 CALL wrk_alloc( jpi,jpj,nlay_i,jpl, z0ei ) 86 CALL wrk_alloc( jpi,jpj,jpl, zhimax, zviold, zvsold, zsmvold ) 87 87 88 88 IF( numit == nstart .AND. lwp ) THEN … … 112 112 113 113 !--- Thickness correction init. ------------------------------- 114 CALL lim_var_glo2eqv115 114 zatold(:,:) = SUM( a_i(:,:,:), dim=3 ) 115 DO jl = 1, jpl 116 DO jj = 1, jpj 117 DO ji = 1, jpi 118 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi20 ) ) 119 ht_i (ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 120 ht_s (ji,jj,jl) = v_s (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 121 END DO 122 END DO 123 END DO 116 124 !--------------------------------------------------------------------- 117 ! Record max of the surrounding ice thicknesses for correction in limupdate125 ! Record max of the surrounding ice thicknesses for correction 118 126 ! in case advection creates ice too thick. 119 127 !--------------------------------------------------------------------- … … 142 150 143 151 IF( zcfl > 0.5_wp .AND. lwp ) ncfl = ncfl + 1 144 IF( numit == nlast .AND. lwp ) THEN 145 IF( ncfl > 0 ) THEN 146 WRITE(cltmp,'(i6.1)') ncfl 147 CALL ctl_stop('STOP',TRIM(cltmp) ) 148 CALL ctl_warn( 'lim_trp: ', TRIM(cltmp), 'advective ice time-step using a split in sub-time-step ') 149 ELSE 150 WRITE(numout,*) 'lim_trp : CFL criteria for ice advection is always smaller than 1/2 ' 151 ENDIF 152 ENDIF 152 !! IF( lwp ) THEN 153 !! IF( ncfl > 0 ) THEN 154 !! WRITE(cltmp,'(i6.1)') ncfl 155 !! CALL ctl_warn( 'lim_trp: ncfl= ', TRIM(cltmp), 'advective ice time-step using a split in sub-time-step ') 156 !! ELSE 157 !! ! WRITE(numout,*) 'lim_trp : CFL criterion for ice advection is always smaller than 1/2 ' 158 !! ENDIF 159 !! ENDIF 153 160 154 161 !------------------------- … … 229 236 CALL lim_adv_x( zusnit, u_ice, 0._wp, zsm, z0smi (:,:,jl), sxsal(:,:,jl), & 230 237 & sxxsal(:,:,jl), sysal(:,:,jl), syysal(:,:,jl), sxysal(:,:,jl) ) 231 232 238 CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0oi (:,:,jl), sxage(:,:,jl), & !--- ice age --- 233 239 & sxxage(:,:,jl), syage(:,:,jl), syyage(:,:,jl), sxyage(:,:,jl) ) … … 346 352 !!gm & cr 347 353 354 ! --- diags --- 355 DO jj = 1, jpj 356 DO ji = 1, jpi 357 diag_trp_ei(ji,jj) = ( SUM( e_i(ji,jj,1:nlay_i,:) ) - zeiold(ji,jj) ) * r1_rdtice 358 diag_trp_es(ji,jj) = ( SUM( e_s(ji,jj,1:nlay_s,:) ) - zesold(ji,jj) ) * r1_rdtice 359 360 diag_trp_vi (ji,jj) = SUM( v_i(ji,jj,:) - zviold(ji,jj,:) ) * r1_rdtice 361 diag_trp_vs (ji,jj) = SUM( v_s(ji,jj,:) - zvsold(ji,jj,:) ) * r1_rdtice 362 diag_trp_smv(ji,jj) = SUM( smv_i(ji,jj,:) - zsmvold(ji,jj,:) ) * r1_rdtice 363 END DO 364 END DO 365 348 366 ! zap small areas 349 367 CALL lim_var_zapsmall 350 368 351 369 !--- Thickness correction in case too high -------------------------------------------------------- 352 CALL lim_var_glo2eqv353 370 DO jl = 1, jpl 354 371 DO jj = 1, jpj … … 357 374 IF ( v_i(ji,jj,jl) > 0._wp ) THEN 358 375 376 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi20 ) ) 377 ht_i (ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 378 ht_s (ji,jj,jl) = v_s (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 379 359 380 zvi = v_i (ji,jj,jl) 360 381 zvs = v_s (ji,jj,jl) … … 366 387 367 388 IF ( ( zdv > 0.0 .AND. (ht_i(ji,jj,jl)+ht_s(ji,jj,jl)) > zhimax(ji,jj,jl) .AND. zatold(ji,jj) < 0.80 ) .OR. & 368 & ( zdv <= 0.0 .AND. (ht_i(ji,jj,jl)+ht_s(ji,jj,jl)) > zhimax(ji,jj,jl) ) ) THEN 389 & ( zdv <= 0.0 .AND. (ht_i(ji,jj,jl)+ht_s(ji,jj,jl)) > zhimax(ji,jj,jl) ) ) THEN 369 390 370 391 rswitch = MAX( 0._wp, SIGN( 1._wp, zhimax(ji,jj,jl) - epsi20 ) ) … … 406 427 ENDIF 407 428 408 ! --- diags ---409 DO jj = 1, jpj410 DO ji = 1, jpi411 diag_trp_ei(ji,jj) = ( SUM( e_i(ji,jj,1:nlay_i,:) ) - zeiold(ji,jj) ) * r1_rdtice412 diag_trp_es(ji,jj) = ( SUM( e_s(ji,jj,1:nlay_s,:) ) - zesold(ji,jj) ) * r1_rdtice413 414 diag_trp_vi (ji,jj) = SUM( v_i(ji,jj,:) - zviold(ji,jj,:) ) * r1_rdtice415 diag_trp_vs (ji,jj) = SUM( v_s(ji,jj,:) - zvsold(ji,jj,:) ) * r1_rdtice416 diag_trp_smv(ji,jj) = SUM( smv_i(ji,jj,:) - zsmvold(ji,jj,:) ) * r1_rdtice417 END DO418 END DO419 420 429 ! --- agglomerate variables ----------------- 421 430 vt_i (:,:) = 0._wp … … 445 454 ENDIF 446 455 447 CALL lim_var_glo2eqv ! equivalent variables, requested for rafting448 449 456 ! ------------------------------------------------- 450 457 ! control prints … … 452 459 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt,-1, ' - ice dyn & trp - ' ) 453 460 ! 454 CALL wrk_dealloc( jpi,jpj, zsm, zatold, zeiold, zesold )455 CALL wrk_dealloc( jpi,jpj,jpl, z0ice, z0snw, z0ai, z0es , z0smi , z0oi )456 CALL wrk_dealloc( jpi,jpj,1, z0opw )457 CALL wrk_dealloc( jpi,jpj,nlay_i +1,jpl, z0ei )458 CALL wrk_dealloc( jpi,jpj,jpl, zviold, zvsold, zhimax, zsmvold )461 CALL wrk_dealloc( jpi,jpj, zsm, zatold, zeiold, zesold ) 462 CALL wrk_dealloc( jpi,jpj,jpl, z0ice, z0snw, z0ai, z0es , z0smi , z0oi ) 463 CALL wrk_dealloc( jpi,jpj,1, z0opw ) 464 CALL wrk_dealloc( jpi,jpj,nlay_i,jpl, z0ei ) 465 CALL wrk_dealloc( jpi,jpj,jpl, zviold, zvsold, zhimax, zsmvold ) 459 466 ! 460 467 IF( nn_timing == 1 ) CALL timing_stop('limtrp') -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limupdate1.F90
- Property svn:keywords set to Id
r5134 r5350 39 39 !!---------------------------------------------------------------------- 40 40 !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 41 !! $Id : limupdate.F90 3294 2012-01-28 16:44:18Z rblod$41 !! $Id$ 42 42 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 43 43 !!---------------------------------------------------------------------- … … 69 69 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limupdate1', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 70 70 71 CALL lim_var_glo2eqv72 71 !---------------------------------------------------- 73 72 ! ice concentration should not exceed amax … … 82 81 DO ji = 1, jpi 83 82 IF( at_i(ji,jj) > rn_amax .AND. a_i(ji,jj,jl) > 0._wp ) THEN 84 a_i(ji,jj,jl) = a_i(ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 83 a_i (ji,jj,jl) = a_i (ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 84 oa_i(ji,jj,jl) = oa_i(ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 85 85 ENDIF 86 86 END DO … … 88 88 END DO 89 89 90 !----------------------------------------------------91 ! Rebin categories with thickness out of bounds92 !----------------------------------------------------93 IF ( jpl > 1 ) CALL lim_itd_th_reb(1, jpl)94 95 !-----------------96 ! zap small values97 !-----------------98 CALL lim_var_zapsmall99 100 90 !--------------------- 101 91 ! Ice salinity bounds … … 106 96 DO ji = 1, jpi 107 97 zsal = smv_i(ji,jj,jl) 108 smv_i(ji,jj,jl) = sm_i(ji,jj,jl) * v_i(ji,jj,jl)109 98 ! salinity stays in bounds 110 99 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - v_i(ji,jj,jl) ) ) … … 117 106 ENDIF 118 107 108 !---------------------------------------------------- 109 ! Rebin categories with thickness out of bounds 110 !---------------------------------------------------- 111 IF ( jpl > 1 ) CALL lim_itd_th_reb(1, jpl) 112 113 !----------------- 114 ! zap small values 115 !----------------- 116 CALL lim_var_zapsmall 117 118 ! ------------------------------------------------- 119 ! Diagnostics 120 ! ------------------------------------------------- 121 DO jl = 1, jpl 122 afx_dyn(:,:) = afx_dyn(:,:) + ( a_i(:,:,jl) - a_i_b(:,:,jl) ) * r1_rdtice 123 END DO 124 125 DO jj = 1, jpj 126 DO ji = 1, jpi 127 ! heat content variation (W.m-2) 128 diag_heat(ji,jj) = - ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) + & 129 & SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) & 130 & ) * r1_rdtice 131 ! salt, volume 132 diag_smvi(ji,jj) = SUM( smv_i(ji,jj,:) - smv_i_b(ji,jj,:) ) * rhoic * r1_rdtice 133 diag_vice(ji,jj) = SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoic * r1_rdtice 134 diag_vsnw(ji,jj) = SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhosn * r1_rdtice 135 END DO 136 END DO 137 119 138 ! conservation test 120 139 IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limupdate1', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 121 122 ! -------------------------------------------------123 ! Diagnostics124 ! -------------------------------------------------125 DO jl = 1, jpl126 afx_dyn(:,:) = afx_dyn(:,:) + ( a_i(:,:,jl) - a_i_b(:,:,jl) ) * r1_rdtice127 END DO128 129 ! heat content variation (W.m-2)130 DO jj = 1, jpj131 DO ji = 1, jpi132 diag_heat_dhc(ji,jj) = - ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) + &133 & SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) &134 & ) * r1_rdtice135 END DO136 END DO137 140 138 141 ! ------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90
- Property svn:keywords set to Id
r5134 r5350 41 41 !!---------------------------------------------------------------------- 42 42 !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 43 !! $Id : limupdate.F90 3294 2012-01-28 16:44:18Z rblod$43 !! $Id$ 44 44 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 45 45 !!---------------------------------------------------------------------- … … 72 72 ! Constrain the thickness of the smallest category above himin 73 73 !---------------------------------------------------------------------- 74 CALL lim_var_glo2eqv75 74 DO jj = 1, jpj 76 75 DO ji = 1, jpi 76 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,1) - epsi20 ) ) !0 if no ice and 1 if yes 77 ht_i(ji,jj,1) = v_i (ji,jj,1) / MAX( a_i(ji,jj,1) , epsi20 ) * rswitch 77 78 IF( v_i(ji,jj,1) > 0._wp .AND. ht_i(ji,jj,1) < rn_himin ) THEN 78 a_i (ji,jj,1) = a_i(ji,jj,1) * ht_i(ji,jj,1) / rn_himin 79 a_i (ji,jj,1) = a_i (ji,jj,1) * ht_i(ji,jj,1) / rn_himin 80 oa_i(ji,jj,1) = oa_i(ji,jj,1) * ht_i(ji,jj,1) / rn_himin 79 81 ENDIF 80 82 END DO … … 93 95 DO ji = 1, jpi 94 96 IF( at_i(ji,jj) > rn_amax .AND. a_i(ji,jj,jl) > 0._wp ) THEN 95 a_i(ji,jj,jl) = a_i(ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 97 a_i (ji,jj,jl) = a_i (ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 98 oa_i(ji,jj,jl) = oa_i(ji,jj,jl) * ( 1._wp - ( 1._wp - rn_amax / at_i(ji,jj) ) ) 96 99 ENDIF 97 100 END DO 98 101 END DO 99 102 END DO 100 101 !----------------------------------------------------102 ! Rebin categories with thickness out of bounds103 !----------------------------------------------------104 IF ( jpl > 1 ) CALL lim_itd_th_reb( 1, jpl )105 106 !-----------------107 ! zap small values108 !-----------------109 CALL lim_var_zapsmall110 103 111 104 !--------------------- … … 117 110 DO ji = 1, jpi 118 111 zsal = smv_i(ji,jj,jl) 119 smv_i(ji,jj,jl) = sm_i(ji,jj,jl) * v_i(ji,jj,jl)120 112 ! salinity stays in bounds 121 113 rswitch = 1._wp - MAX( 0._wp, SIGN( 1._wp, - v_i(ji,jj,jl) ) ) … … 127 119 END DO 128 120 ENDIF 121 122 !---------------------------------------------------- 123 ! Rebin categories with thickness out of bounds 124 !---------------------------------------------------- 125 IF ( jpl > 1 ) CALL lim_itd_th_reb( 1, jpl ) 126 127 !----------------- 128 ! zap small values 129 !----------------- 130 CALL lim_var_zapsmall 129 131 130 132 !------------------------------------------------------------------------------ … … 150 152 v_ice(:,:) = v_ice(:,:) * vmask(:,:,1) 151 153 152 ! for outputs153 CALL lim_var_glo2eqv ! equivalent variables (outputs)154 CALL lim_var_agg(2) ! aggregate ice thickness categories155 156 ! conservation test157 IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limupdate2', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b)158 159 154 ! ------------------------------------------------- 160 155 ! Diagnostics 161 156 ! ------------------------------------------------- 162 157 DO jl = 1, jpl 158 oa_i(:,:,jl) = oa_i(:,:,jl) + a_i(:,:,jl) * rdt_ice / rday ! ice natural aging 163 159 afx_thd(:,:) = afx_thd(:,:) + ( a_i(:,:,jl) - a_i_b(:,:,jl) ) * r1_rdtice 164 160 END DO 165 161 afx_tot = afx_thd + afx_dyn 166 162 167 ! heat content variation (W.m-2)168 163 DO jj = 1, jpj 169 164 DO ji = 1, jpi 170 diag_heat_dhc(ji,jj) = diag_heat_dhc(ji,jj) - & 171 & ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) + & 172 & SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) & 173 & ) * r1_rdtice 174 END DO 175 END DO 165 ! heat content variation (W.m-2) 166 diag_heat(ji,jj) = diag_heat(ji,jj) - & 167 & ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) + & 168 & SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) & 169 & ) * r1_rdtice 170 ! salt, volume 171 diag_smvi(ji,jj) = diag_smvi(ji,jj) + SUM( smv_i(ji,jj,:) - smv_i_b(ji,jj,:) ) * rhoic * r1_rdtice 172 diag_vice(ji,jj) = diag_vice(ji,jj) + SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoic * r1_rdtice 173 diag_vsnw(ji,jj) = diag_vsnw(ji,jj) + SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhosn * r1_rdtice 174 END DO 175 END DO 176 177 ! conservation test 178 IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limupdate2', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 179 180 ! for outputs 181 CALL lim_var_glo2eqv 182 CALL lim_var_agg(2) 176 183 177 184 ! ------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
r5134 r5350 124 124 DO ji = 1, jpi 125 125 et_s(ji,jj) = et_s(ji,jj) + e_s(ji,jj,1,jl) ! snow heat content 126 rswitch = MAX( 0._wp , SIGN( 1._wp , vt_i(ji,jj) - epsi 10 ) )127 smt_i(ji,jj) = smt_i(ji,jj) + smv_i(ji,jj,jl) / MAX( vt_i(ji,jj) , epsi 10 ) * rswitch ! ice salinity128 rswitch = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi 10 ) )129 ot_i(ji,jj) = ot_i(ji,jj) + oa_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi 10 ) * rswitch ! ice age126 rswitch = MAX( 0._wp , SIGN( 1._wp , vt_i(ji,jj) - epsi20 ) ) 127 smt_i(ji,jj) = smt_i(ji,jj) + smv_i(ji,jj,jl) / MAX( vt_i(ji,jj) , epsi20 ) * rswitch ! ice salinity 128 rswitch = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi20 ) ) 129 ot_i(ji,jj) = ot_i(ji,jj) + oa_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi20 ) * rswitch ! ice age 130 130 END DO 131 131 END DO … … 161 161 DO jj = 1, jpj 162 162 DO ji = 1, jpi 163 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi 10 ) ) !0 if no ice and 1 if yes164 ht_i(ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi 10 ) * rswitch165 ht_s(ji,jj,jl) = v_s (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi 10 ) * rswitch166 o_i(ji,jj,jl) = oa_i(ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi 10 ) * rswitch163 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi20 ) ) !0 if no ice and 1 if yes 164 ht_i(ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 165 ht_s(ji,jj,jl) = v_s (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 166 o_i(ji,jj,jl) = oa_i(ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 167 167 END DO 168 168 END DO … … 173 173 DO jj = 1, jpj 174 174 DO ji = 1, jpi 175 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) - epsi10 ) ) !0 if no ice and 1 if yes 176 sm_i(ji,jj,jl) = smv_i(ji,jj,jl) / MAX( v_i(ji,jj,jl) , epsi10 ) * rswitch 175 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) - epsi20 ) ) !0 if no ice and 1 if yes 176 sm_i(ji,jj,jl) = smv_i(ji,jj,jl) / MAX( v_i(ji,jj,jl) , epsi20 ) * rswitch 177 ! ! bounding salinity 178 sm_i(ji,jj,jl) = MAX( sm_i(ji,jj,jl), rn_simin ) 177 179 END DO 178 180 END DO … … 199 201 zdiscrim = SQRT( MAX(zbbb*zbbb - 4._wp*zaaa*zccc , 0._wp) ) 200 202 t_i(ji,jj,jk,jl) = rt0 + rswitch *( - zbbb - zdiscrim ) / ( 2.0 *zaaa ) 201 t_i(ji,jj,jk,jl) = MIN( rt0, MAX( 173.15_wp, t_i(ji,jj,jk,jl) ) ) ! 100-rt0 < t_i < rt0203 t_i(ji,jj,jk,jl) = MIN( ztmelts, MAX( rt0 - 100._wp, t_i(ji,jj,jk,jl) ) ) ! -100 < t_i < ztmelts 202 204 END DO 203 205 END DO … … 219 221 ! 220 222 t_s(ji,jj,jk,jl) = rt0 + rswitch * ( - zfac1 * zq_s + zfac2 ) 221 t_s(ji,jj,jk,jl) = MIN( rt0, MAX( 173.15, t_s(ji,jj,jk,jl) ) ) ! 100-rt0 < t_i< rt0223 t_s(ji,jj,jk,jl) = MIN( rt0, MAX( rt0 - 100._wp , t_s(ji,jj,jk,jl) ) ) ! -100 < t_s < rt0 222 224 END DO 223 225 END DO … … 228 230 ! Mean temperature 229 231 !------------------- 232 vt_i (:,:) = 0._wp 233 DO jl = 1, jpl 234 vt_i(:,:) = vt_i(:,:) + v_i(:,:,jl) 235 END DO 236 230 237 tm_i(:,:) = 0._wp 231 238 DO jl = 1, jpl … … 234 241 DO ji = 1, jpi 235 242 rswitch = MAX( 0._wp , SIGN( 1._wp , vt_i(ji,jj) - epsi10 ) ) 236 tm_i(ji,jj) = tm_i(ji,jj) + rswitch * t_i(ji,jj,jk,jl) * v_i(ji,jj,jl) & 237 & / ( REAL(nlay_i,wp) * MAX( vt_i(ji,jj) , epsi10 ) ) 238 END DO 239 END DO 240 END DO 241 END DO 243 tm_i(ji,jj) = tm_i(ji,jj) + r1_nlay_i * rswitch * ( t_i(ji,jj,jk,jl) - rt0 ) * v_i(ji,jj,jl) & 244 & / MAX( vt_i(ji,jj) , epsi10 ) 245 END DO 246 END DO 247 END DO 248 END DO 249 tm_i = tm_i + rt0 242 250 ! 243 251 END SUBROUTINE lim_var_glo2eqv … … 258 266 v_s(:,:,:) = ht_s(:,:,:) * a_i(:,:,:) 259 267 smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 260 oa_i (:,:,:) = o_i (:,:,:) * a_i(:,:,:)261 268 ! 262 269 END SUBROUTINE lim_var_eqv2glo … … 305 312 DO jj = 1, jpj 306 313 DO ji = 1, jpi 307 z_slope_s(ji,jj,jl) = 2._wp * sm_i(ji,jj,jl) / MAX( epsi10 , ht_i(ji,jj,jl) ) 314 rswitch = MAX( 0._wp , SIGN( 1._wp , ht_i(ji,jj,jl) - epsi20 ) ) 315 z_slope_s(ji,jj,jl) = rswitch * 2._wp * sm_i(ji,jj,jl) / MAX( epsi20 , ht_i(ji,jj,jl) ) 308 316 END DO 309 317 END DO … … 339 347 ! ! weighting the profile 340 348 s_i(ji,jj,jk,jl) = zalpha(ji,jj,jl) * zs_zero + ( 1._wp - zalpha(ji,jj,jl) ) * sm_i(ji,jj,jl) 349 ! ! bounding salinity 350 s_i(ji,jj,jk,jl) = MIN( rn_simax, MAX( s_i(ji,jj,jk,jl), rn_simin ) ) 341 351 END DO 342 352 END DO … … 379 389 380 390 ! Mean sea ice temperature 391 vt_i (:,:) = 0._wp 392 DO jl = 1, jpl 393 vt_i(:,:) = vt_i(:,:) + v_i(:,:,jl) 394 END DO 395 381 396 tm_i(:,:) = 0._wp 382 397 DO jl = 1, jpl … … 385 400 DO ji = 1, jpi 386 401 rswitch = MAX( 0._wp , SIGN( 1._wp , vt_i(ji,jj) - epsi10 ) ) 387 tm_i(ji,jj) = tm_i(ji,jj) + rswitch * t_i(ji,jj,jk,jl) * v_i(ji,jj,jl) & 388 & * r1_nlay_i / MAX( vt_i(ji,jj) , epsi10 ) 389 END DO 390 END DO 391 END DO 392 END DO 402 tm_i(ji,jj) = tm_i(ji,jj) + r1_nlay_i * rswitch * ( t_i(ji,jj,jk,jl) - rt0 ) * v_i(ji,jj,jl) & 403 & / MAX( vt_i(ji,jj) , epsi10 ) 404 END DO 405 END DO 406 END DO 407 END DO 408 tm_i = tm_i + rt0 393 409 394 410 END SUBROUTINE lim_var_icetm … … 409 425 !!------------------------------------------------------------------ 410 426 ! 427 vt_i (:,:) = 0._wp 428 DO jl = 1, jpl 429 vt_i(:,:) = vt_i(:,:) + v_i(:,:,jl) 430 END DO 431 411 432 bv_i(:,:) = 0._wp 412 433 DO jl = 1, jpl … … 417 438 zbvi = - rswitch * tmut * s_i(ji,jj,jk,jl) / MIN( t_i(ji,jj,jk,jl) - rt0, - epsi10 ) & 418 439 & * v_i(ji,jj,jl) * r1_nlay_i 419 rswitch = ( 1._wp - MAX( 0._wp , SIGN( 1._wp , - vt_i(ji,jj) + epsi 10 ) ) )420 bv_i(ji,jj) = bv_i(ji,jj) + rswitch * zbvi / MAX( vt_i(ji,jj) , epsi 10 )440 rswitch = ( 1._wp - MAX( 0._wp , SIGN( 1._wp , - vt_i(ji,jj) + epsi20 ) ) ) 441 bv_i(ji,jj) = bv_i(ji,jj) + rswitch * zbvi / MAX( vt_i(ji,jj) , epsi20 ) 421 442 END DO 422 443 END DO … … 460 481 ! 461 482 DO ji = kideb, kiut ! Slope of the linear profile zs_zero 462 z_slope_s(ji) = 2._wp * sm_i_1d(ji) / MAX( epsi10 , ht_i_1d(ji) ) 483 rswitch = MAX( 0._wp , SIGN( 1._wp , ht_i_1d(ji) - epsi20 ) ) 484 z_slope_s(ji) = rswitch * 2._wp * sm_i_1d(ji) / MAX( epsi20 , ht_i_1d(ji) ) 463 485 END DO 464 486 … … 484 506 ! weighting the profile 485 507 s_i_1d(ji,jk) = zalpha * zs_zero + ( 1._wp - zalpha ) * sm_i_1d(ji) 508 ! bounding salinity 509 s_i_1d(ji,jk) = MIN( rn_simax, MAX( s_i_1d(ji,jk), rn_simin ) ) 486 510 END DO 487 511 END DO … … 537 561 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi10 ) ) 538 562 rswitch = MAX( 0._wp , SIGN( 1._wp, at_i(ji,jj ) - epsi10 ) ) * rswitch 563 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) - epsi10 ) ) * rswitch 564 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) * rswitch & 565 & / MAX( a_i(ji,jj,jl), epsi10 ) - epsi10 ) ) * rswitch 539 566 zei = e_i(ji,jj,jk,jl) 540 567 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * rswitch … … 550 577 rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi10 ) ) 551 578 rswitch = MAX( 0._wp , SIGN( 1._wp, at_i(ji,jj ) - epsi10 ) ) * rswitch 552 579 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) - epsi10 ) ) * rswitch 580 rswitch = MAX( 0._wp , SIGN( 1._wp, v_i(ji,jj,jl) * rswitch & 581 & / MAX( a_i(ji,jj,jl), epsi10 ) - epsi10 ) ) * rswitch 553 582 zsal = smv_i(ji,jj, jl) 554 583 zvi = v_i (ji,jj, jl) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
r5123 r5350 72 72 ! Mean category values 73 73 !----------------------------- 74 z1_365 = 1._wp / 365._wp 74 75 75 76 CALL lim_var_icetm ! mean sea ice temperature … … 112 113 CALL lbc_lnk( z2da, 'T', -1. ) 113 114 CALL lbc_lnk( z2db, 'T', -1. ) 114 CALL iom_put( "uice_ipa" , z2da 115 CALL iom_put( "vice_ipa" , z2db 115 CALL iom_put( "uice_ipa" , z2da ) ! ice velocity u component 116 CALL iom_put( "vice_ipa" , z2db ) ! ice velocity v component 116 117 DO jj = 1, jpj 117 118 DO ji = 1, jpi … … 119 120 END DO 120 121 END DO 121 CALL iom_put( "icevel" , z2d 122 CALL iom_put( "icevel" , z2d ) ! ice velocity module 122 123 ENDIF 123 124 ! … … 127 128 DO jj = 1, jpj 128 129 DO ji = 1, jpi 129 z2d(ji,jj) = z2d(ji,jj) + zswi(ji,jj) * oa_i(ji,jj,jl) 130 rswitch = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.1 ) ) 131 z2d(ji,jj) = z2d(ji,jj) + rswitch * oa_i(ji,jj,jl) / MAX( at_i(ji,jj), 0.1 ) 130 132 END DO 131 133 END DO 132 134 END DO 133 z1_365 = 1._wp / 365._wp 134 CALL iom_put( "miceage" , z2d * z1_365 ) ! mean ice age 135 CALL iom_put( "miceage" , z2d * z1_365 ) ! mean ice age 135 136 ENDIF 136 137 … … 141 142 END DO 142 143 END DO 143 CALL iom_put( "micet" , z2d 144 CALL iom_put( "micet" , z2d ) ! mean ice temperature 144 145 ENDIF 145 146 ! … … 153 154 END DO 154 155 END DO 155 CALL iom_put( "icest" , z2d 156 CALL iom_put( "icest" , z2d ) ! ice surface temperature 156 157 ENDIF 157 158 … … 163 164 END DO 164 165 END DO 165 CALL iom_put( "icecolf" , z2d 166 CALL iom_put( "icecolf" , z2d ) ! frazil ice collection thickness 166 167 ENDIF 167 168 … … 232 233 CALL iom_put ('hfxopw' , hfx_opw(:,:) ) ! 233 234 CALL iom_put ('hfxtur' , fhtur(:,:) * at_i(:,:) ) ! turbulent heat flux at ice base 234 CALL iom_put ('hfxdhc' , diag_heat _dhc(:,:)) ! Heat content variation in snow and ice235 CALL iom_put ('hfxdhc' , diag_heat(:,:) ) ! Heat content variation in snow and ice 235 236 CALL iom_put ('hfxspr' , hfx_spr(:,:) ) ! Heat content of snow precip 236 237 … … 248 249 DO jj = 1, jpj 249 250 DO ji = 1, jpi 250 rswitch = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) 251 zoi(ji,jj,jl) = oa_i(ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi06 ) * rswitch 251 rswitch = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.1 ) ) 252 rswitch = rswitch * MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - 0.1 ) ) 253 zoi(ji,jj,jl) = oa_i(ji,jj,jl) / MAX( a_i(ji,jj,jl) , 0.1 ) * rswitch 252 254 END DO 253 255 END DO 254 256 END DO 255 CALL iom_put( "iceage_cat" , zoi) ! ice age for categories257 CALL iom_put( "iceage_cat" , zoi * z1_365 ) ! ice age for categories 256 258 ENDIF 257 259 … … 264 266 DO ji = 1, jpi 265 267 rswitch = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) 266 zei(ji,jj,jl) = zei(ji,jj,jl) + 100.0 *&268 zei(ji,jj,jl) = zei(ji,jj,jl) + 100.0 * & 267 269 ( - tmut * s_i(ji,jj,jk,jl) / MIN( ( t_i(ji,jj,jk,jl) - rt0 ), - epsi06 ) ) * & 268 270 rswitch * r1_nlay_i … … 271 273 END DO 272 274 END DO 273 CALL iom_put( "brinevol_cat" , zei 275 CALL iom_put( "brinevol_cat" , zei ) ! brine volume for categories 274 276 ENDIF 275 277 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/LIM_SRC_3/thd_ice.F90
r5123 r5350 20 20 ! !!! ** ice-thermo namelist (namicethd) ** 21 21 REAL(wp), PUBLIC :: rn_himin !: minimum ice thickness 22 REAL(wp), PUBLIC :: parsub !: switch for snow sublimation or not23 22 REAL(wp), PUBLIC :: rn_maxfrazb !: maximum portion of frazil ice collecting at the ice bottom 24 23 REAL(wp), PUBLIC :: rn_vfrazb !: threshold drift speed for collection of bottom frazil ice … … 55 54 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_1d 56 55 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_rem_1d 56 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_dif_1d 57 57 58 58 ! heat flux associated with ice-atmosphere mass exchange … … 139 139 !!---------------------------------------------------------------------! 140 140 141 ALLOCATE( npb (jpij) , nplm (jpij) , npac (jpij), & 142 ! ! 143 & qlead_1d (jpij) , ftr_ice_1d (jpij) , & 144 & qsr_ice_1d (jpij) , & 145 & fr1_i0_1d(jpij) , fr2_i0_1d(jpij) , qns_ice_1d(jpij) , & 146 & t_bo_1d (jpij) , & 147 & hfx_sum_1d(jpij) , hfx_bom_1d(jpij) ,hfx_bog_1d(jpij) , & 148 & hfx_dif_1d(jpij) ,hfx_opw_1d(jpij) , & 149 & hfx_thd_1d(jpij) , hfx_spr_1d(jpij) , & 150 & hfx_snw_1d(jpij) , hfx_sub_1d(jpij) , hfx_err_1d(jpij) , & 151 & hfx_res_1d(jpij) , hfx_err_rem_1d(jpij), STAT=ierr(1) ) 141 ALLOCATE( npb (jpij) , nplm (jpij) , npac (jpij) , & 142 & qlead_1d (jpij) , ftr_ice_1d(jpij) , qsr_ice_1d (jpij) , & 143 & fr1_i0_1d(jpij) , fr2_i0_1d (jpij) , qns_ice_1d(jpij) , & 144 & t_bo_1d (jpij) , & 145 & hfx_sum_1d(jpij) , hfx_bom_1d(jpij) ,hfx_bog_1d(jpij) , & 146 & hfx_dif_1d(jpij) , hfx_opw_1d(jpij) , & 147 & hfx_thd_1d(jpij) , hfx_spr_1d(jpij) , & 148 & hfx_snw_1d(jpij) , hfx_sub_1d(jpij) , hfx_err_1d(jpij) , & 149 & hfx_res_1d(jpij) , hfx_err_rem_1d(jpij) , hfx_err_dif_1d(jpij) , STAT=ierr(1) ) 152 150 ! 153 ALLOCATE( sprecip_1d (jpij) , frld_1d (jpij) , at_i_1d (jpij) , & 154 & fhtur_1d (jpij) , wfx_snw_1d (jpij) , wfx_spr_1d (jpij) , & 155 & fhld_1d (jpij) , wfx_sub_1d (jpij) , wfx_bog_1d(jpij) , wfx_bom_1d(jpij) , & 156 & wfx_sum_1d(jpij) , wfx_sni_1d (jpij) , wfx_opw_1d (jpij) , wfx_res_1d (jpij) , & 157 & dqns_ice_1d(jpij) , qla_ice_1d (jpij) , dqla_ice_1d(jpij) , & 158 & tatm_ice_1d(jpij) , & 159 & i0 (jpij) , & 160 & sfx_bri_1d (jpij) , sfx_bog_1d (jpij) , sfx_bom_1d (jpij) ,sfx_sum_1d (jpij) , & 161 & sfx_sni_1d (jpij) , sfx_opw_1d (jpij) , sfx_res_1d (jpij) , & 162 & dsm_i_fl_1d(jpij) , dsm_i_gd_1d(jpij) , dsm_i_se_1d(jpij) , & 151 ALLOCATE( sprecip_1d (jpij) , frld_1d (jpij) , at_i_1d (jpij) , & 152 & fhtur_1d (jpij) , wfx_snw_1d (jpij) , wfx_spr_1d (jpij) , & 153 & fhld_1d (jpij) , wfx_sub_1d (jpij) , wfx_bog_1d (jpij) , wfx_bom_1d(jpij) , & 154 & wfx_sum_1d(jpij) , wfx_sni_1d (jpij) , wfx_opw_1d (jpij) , wfx_res_1d(jpij) , & 155 & dqns_ice_1d(jpij) , qla_ice_1d (jpij) , dqla_ice_1d(jpij) , & 156 & tatm_ice_1d(jpij) , i0 (jpij) , & 157 & sfx_bri_1d (jpij) , sfx_bog_1d (jpij) , sfx_bom_1d (jpij) , sfx_sum_1d (jpij), & 158 & sfx_sni_1d (jpij) , sfx_opw_1d (jpij) , sfx_res_1d (jpij) , & 159 & dsm_i_fl_1d(jpij) , dsm_i_gd_1d(jpij) , dsm_i_se_1d(jpij) , & 163 160 & dsm_i_si_1d(jpij) , hicol_1d (jpij) , STAT=ierr(2) ) 164 161 ! 165 ALLOCATE( t_su_1d (jpij) , a_i_1d (jpij) , ht_i_1d(jpij) , &166 & ht_s_1d 162 ALLOCATE( t_su_1d (jpij) , a_i_1d (jpij) , ht_i_1d (jpij) , & 163 & ht_s_1d (jpij) , fc_su (jpij) , fc_bo_i (jpij) , & 167 164 & dh_s_tot (jpij) , dh_i_surf(jpij) , dh_i_bott(jpij) , & 168 & dh_snowice(jpij) , & 169 & sm_i_1d (jpij) , s_i_new (jpij) , & 170 & t_s_1d(jpij,nlay_s), & 171 & t_i_1d(jpij,nlay_i+1), s_i_1d(jpij,nlay_i+1) , & 172 & q_i_1d(jpij,nlay_i+1), q_s_1d(jpij,nlay_i+1) , & 165 & dh_snowice(jpij) , sm_i_1d (jpij) , s_i_new (jpij) , & 166 & t_s_1d(jpij,nlay_s) , t_i_1d(jpij,nlay_i) , s_i_1d(jpij,nlay_i) , & 167 & q_i_1d(jpij,nlay_i+1) , q_s_1d(jpij,nlay_s) , & 173 168 & qh_i_old(jpij,0:nlay_i+1), h_i_old(jpij,0:nlay_i+1) , STAT=ierr(3)) 174 169 ! -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OFF_SRC/domain.F90
r5347 r5350 116 116 USE ioipsl 117 117 INTEGER :: ios ! Local integer output status for namelist read 118 NAMELIST/namrun/ nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl , & 119 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 118 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, & 119 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 120 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 120 121 & nn_write, ln_dimgnnn, ln_mskland , ln_cfmeta , ln_clobber, nn_chunksz, nn_euler 121 122 NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh , rn_hmin, & … … 172 173 ninist = nn_istate 173 174 nstock = nn_stock 175 nstocklist = nn_stocklist 174 176 nwrite = nn_write 175 177 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
- Property svn:keywords set to Id
r5120 r5350 62 62 !!---------------------------------------------------------------------- 63 63 !! NEMO/OFF 3.3 , NEMO Consortium (2010) 64 !! $Id : nemogcm.F90 2528 2010-12-27 17:33:53Z rblod$64 !! $Id$ 65 65 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 66 66 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/dtadyn.F90
- Property svn:keywords set to Id
-
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/obs_fbm.F90
- Property svn:keywords set to Id
-
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/ooo_data.F90
- Property svn:keywords set to Id
r4132 r5350 40 40 CHARACTER(len=128) :: & 41 41 & alt_file !: altimeter file 42 !! $Id$ 42 43 CONTAINS 43 44 SUBROUTINE ooo_data_init( ld_cl4 ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/ooo_intp.F90
- Property svn:keywords set to Id
r4120 r5350 16 16 PUBLIC ooo_interp 17 17 18 !! $Id$ 18 19 CONTAINS 19 20 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/ooo_read.F90
- Property svn:keywords set to Id
r4117 r5350 22 22 PUBLIC ooo_rea_dri 23 23 24 !! $Id$ 24 25 CONTAINS 25 26 SUBROUTINE ooo_rea_dri(kfile) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/ooo_utils.F90
- Property svn:keywords set to Id
r4111 r5350 10 10 REAL(kind=dp), PARAMETER :: obfilldbl=99999. 11 11 12 !! $Id$ 12 13 CONTAINS 13 14 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OOO_SRC/ooo_write.F90
- Property svn:keywords set to Id
r4110 r5350 29 29 END INTERFACE 30 30 31 !! $Id$ 31 32 CONTAINS 32 33 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
- Property svn:keywords set to Id
r4990 r5350 57 57 !!---------------------------------------------------------------------- 58 58 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 59 !! $Id :$59 !! $Id$ 60 60 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 61 61 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
- Property svn:keywords set to Id
r4999 r5350 36 36 !!---------------------------------------------------------------------- 37 37 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 38 !! $Id : bdydyn.F90 2528 2010-12-27 17:33:53Z rblod$38 !! $Id$ 39 39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 40 40 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90
- Property svn:keywords set to Id
r4354 r5350 33 33 !!---------------------------------------------------------------------- 34 34 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 35 !! $Id : bdydyn.F90 2528 2010-12-27 17:33:53Z rblod$35 !! $Id$ 36 36 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 37 37 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
- Property svn:keywords set to Id
r5123 r5350 28 28 USE ice ! LIM_3 ice variables 29 29 USE dom_ice ! sea-ice domain 30 USE limvar 30 31 #endif 31 32 USE par_oce ! ocean parameters … … 41 42 PRIVATE 42 43 43 PUBLIC bdy_ice_lim ! routine called in sbcmod44 PUBLIC bdy_ice_lim ! routine called in sbcmod 44 45 PUBLIC bdy_ice_lim_dyn ! routine called in limrhg 45 46 46 47 !!---------------------------------------------------------------------- 47 48 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 48 !! $Id : bdyice.F90 2715 2011-03-30 15:58:35Z rblod$49 !! $Id$ 49 50 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 50 51 !!---------------------------------------------------------------------- … … 61 62 INTEGER :: ib_bdy ! Loop index 62 63 64 #if defined key_lim3 65 CALL lim_var_glo2eqv 66 #endif 67 63 68 DO ib_bdy=1, nb_bdy 64 69 … … 73 78 74 79 END DO 80 81 #if defined key_lim3 82 CALL lim_var_zapsmall 83 CALL lim_var_agg(1) 84 #endif 75 85 76 86 END SUBROUTINE bdy_ice_lim … … 89 99 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 90 100 INTEGER, INTENT(in) :: kt ! main time-step counter 91 INTEGER, INTENT(in) :: ib_bdy ! BDY set index !!101 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 92 102 93 103 INTEGER :: jpbound ! 0 = incoming ice … … 169 179 jpbound = 0; ii = ji; ij = jj; 170 180 171 IF ( u_ice(ji+1,jj ) < 0. .AND. umask(ji-1,jj ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 172 IF ( u_ice(ji-1,jj ) > 0. .AND. umask(ji+1,jj ,1) == 0. ) jpbound = 1; ii = ji-1; ij = jj 173 IF ( v_ice(ji ,jj+1) < 0. .AND. vmask(ji ,jj-1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj+1 174 IF ( v_ice(ji ,jj-1) > 0. .AND. vmask(ji ,jj+1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj-1 175 176 rswitch = 1.0 - MAX( 0.0_wp , SIGN ( 1.0_wp , - at_i(ii,ij) + 0.01 ) ) ! 0 if no ice 181 IF( u_ice(ji+1,jj ) < 0. .AND. umask(ji-1,jj ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 182 IF( u_ice(ji-1,jj ) > 0. .AND. umask(ji+1,jj ,1) == 0. ) jpbound = 1; ii = ji-1; ij = jj 183 IF( v_ice(ji ,jj+1) < 0. .AND. vmask(ji ,jj-1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj+1 184 IF( v_ice(ji ,jj-1) > 0. .AND. vmask(ji ,jj+1,1) == 0. ) jpbound = 1; ii = ji ; ij = jj-1 185 186 IF( nn_ice_lim_dta(ib_bdy) == 0 ) jpbound = 0; ii = ji; ij = jj ! case ice boundaries = initial conditions 187 ! do not make state variables dependent on velocity 188 189 190 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ii,ij) - 0.01 ) ) ! 0 if no ice 177 191 178 192 ! concentration and thickness … … 190 204 191 205 ! Ice salinity, age, temperature 192 sm_i(ji,jj,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * s_i_min193 o _i(ji,jj,jl) = rswitch * rn_ice_age(ib_bdy) + ( 1.0 - rswitch)206 sm_i(ji,jj,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * rn_simin 207 oa_i(ji,jj,jl) = rswitch * rn_ice_age(ib_bdy) * a_i(ji,jj,jl) 194 208 t_su(ji,jj,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rn_ice_tem(ib_bdy) 195 209 DO jk = 1, nlay_s … … 198 212 DO jk = 1, nlay_i 199 213 t_i(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rt0 200 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * s_i_min214 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * rn_simin 201 215 END DO 202 216 … … 204 218 205 219 ! Ice salinity, age, temperature 206 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0 - rswitch ) * s_i_min207 o _i(ji,jj,jl) = rswitch * o_i(ii,ij,jl) + ( 1.0 - rswitch)220 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0 - rswitch ) * rn_simin 221 oa_i(ji,jj,jl) = rswitch * oa_i(ii,ij,jl) 208 222 t_su(ji,jj,jl) = rswitch * t_su(ii,ij,jl) + ( 1.0 - rswitch ) * rt0 209 223 DO jk = 1, nlay_s … … 212 226 DO jk = 1, nlay_i 213 227 t_i(ji,jj,jk,jl) = rswitch * t_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rt0 214 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * s_i_min228 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rn_simin 215 229 END DO 216 230 … … 218 232 219 233 ! if salinity is constant, then overwrite rn_ice_sal 220 IF( n um_sal == 1 ) THEN221 sm_i(ji,jj,jl) = bulk_sal222 s_i (ji,jj,:,jl) = bulk_sal234 IF( nn_icesal == 1 ) THEN 235 sm_i(ji,jj,jl) = rn_icesal 236 s_i (ji,jj,:,jl) = rn_icesal 223 237 ENDIF 224 238 225 239 ! contents 226 240 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) 227 oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl)228 241 DO jk = 1, nlay_s 229 242 ! Snow energy of melting … … 254 267 CALL lbc_bdy_lnk( sm_i(:,:,jl), 'T', 1., ib_bdy ) 255 268 CALL lbc_bdy_lnk( oa_i(:,:,jl), 'T', 1., ib_bdy ) 256 CALL lbc_bdy_lnk( o_i(:,:,jl), 'T', 1., ib_bdy )257 269 CALL lbc_bdy_lnk( t_su(:,:,jl), 'T', 1., ib_bdy ) 258 270 DO jk = 1, nlay_s … … 286 298 !! 287 299 CHARACTER(len=1), INTENT(in) :: cd_type ! nature of velocity grid-points 288 INTEGER :: jb, jgrd ! dummy loop indices300 INTEGER :: jb, jgrd ! dummy loop indices 289 301 INTEGER :: ji, jj ! local scalar 290 INTEGER :: ib_bdy ! Loop index302 INTEGER :: ib_bdy ! Loop index 291 303 REAL(wp) :: zmsk1, zmsk2, zflag 292 304 !!------------------------------------------------------------------------------ … … 304 316 CASE('frs') 305 317 306 318 IF( nn_ice_lim_dta(ib_bdy) == 0 ) CYCLE ! case ice boundaries = initial conditions 319 ! do not change ice velocity (it is only computed by rheology) 320 307 321 SELECT CASE ( cd_type ) 308 322 309 323 CASE ( 'U' ) 310 324 … … 321 335 322 336 ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 323 u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5 * ABS( zflag + 1._wp ) * zmsk1 + &324 & u_ice(ji-1,jj) * 0.5 * ABS( zflag - 1._wp ) * zmsk2 + &337 u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 338 & u_ice(ji-1,jj) * 0.5_wp * ABS( zflag - 1._wp ) * zmsk2 + & 325 339 & u_oce(ji ,jj) * ( 1._wp - MIN( 1._wp, zmsk1 + zmsk2 ) ) 326 340 ELSE ! everywhere else … … 329 343 ENDIF 330 344 ! mask ice velocities 331 rswitch = 1.0 - MAX( 0.0_wp , SIGN ( 1.0_wp , - at_i(ji,jj) + 0.01) ) ! 0 if no ice345 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01_wp ) ) ! 0 if no ice 332 346 u_ice(ji,jj) = rswitch * u_ice(ji,jj) 333 347 334 348 ENDDO 335 349 336 350 CALL lbc_bdy_lnk( u_ice(:,:), 'U', -1., ib_bdy ) 337 351 … … 350 364 351 365 ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 352 v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5 * ABS( zflag + 1._wp ) * zmsk1 + &353 & v_ice(ji,jj-1) * 0.5 * ABS( zflag - 1._wp ) * zmsk2 + &366 v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 367 & v_ice(ji,jj-1) * 0.5_wp * ABS( zflag - 1._wp ) * zmsk2 + & 354 368 & v_oce(ji,jj ) * ( 1._wp - MIN( 1._wp, zmsk1 + zmsk2 ) ) 355 369 ELSE ! everywhere else … … 358 372 ENDIF 359 373 ! mask ice velocities 360 rswitch = 1.0 - MAX( 0.0_wp , SIGN ( 1.0_wp , - at_i(ji,jj) +0.01 ) ) ! 0 if no ice374 rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01 ) ) ! 0 if no ice 361 375 v_ice(ji,jj) = rswitch * v_ice(ji,jj) 362 376 … … 364 378 365 379 CALL lbc_bdy_lnk( v_ice(:,:), 'V', -1., ib_bdy ) 366 380 367 381 END SELECT 368 382 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/BDY/bdylib.F90
- Property svn:keywords set to Id
r4292 r5350 29 29 !!---------------------------------------------------------------------- 30 30 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 31 !! $Id : bdydyn.F90 2528 2010-12-27 17:33:53Z rblod$31 !! $Id$ 32 32 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 33 33 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90
- Property svn:keywords set to Id
r4667 r5350 31 31 !!---------------------------------------------------------------------- 32 32 !! NEMO/C1D 3.3 , NEMO Consortium (2010) 33 !! $Id : c1d.F90 2382 2010-11-13 13:08:12Z gm$33 !! $Id$ 34 34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 35 35 !!====================================================================== -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
- Property svn:keywords set to Id
r4667 r5350 26 26 !!---------------------------------------------------------------------- 27 27 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 28 !! $Id : domc1d.F90 3851 2013-04-30 10:30:51Z hadcv$28 !! $Id$ 29 29 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 30 30 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90
- Property svn:keywords set to Id
r4624 r5350 35 35 !!---------------------------------------------------------------------- 36 36 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 37 !! $Id : dtauvd.F90 2392 2010-11-15 21:20:05Z gm$37 !! $Id$ 38 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 39 39 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/dyncor_c1d.F90
- Property svn:keywords set to Id
r2409 r5350 30 30 !!---------------------------------------------------------------------- 31 31 !! NEMO/C1D 3.3 , NEMO Consortium (2010) 32 !! $Id : dyncor_c1d.F90 2382 2010-11-13 13:08:12Z gm$32 !! $Id$ 33 33 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 34 34 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
- Property svn:keywords set to Id
r5102 r5350 47 47 !!---------------------------------------------------------------------- 48 48 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 49 !! $Id : dyndmp.F90 3294 2012-01-28 16:44:18Z rblod$49 !! $Id$ 50 50 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 51 51 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90
- Property svn:keywords set to Id
r2409 r5350 25 25 !!---------------------------------------------------------------------- 26 26 !! NEMO/C1D 3.3 , NEMO Consortium (2010) 27 !! $Id : dynnxt_c1d.F90 2382 2010-11-13 13:08:12Z gm$27 !! $Id$ 28 28 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 29 29 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
- Property svn:keywords set to Id
r5108 r5350 32 32 !!---------------------------------------------------------------------- 33 33 !! NEMO/C1D 3.3 , NEMO Consortium (2010) 34 !! $Id : step_c1d.F90 2382 2010-11-13 13:08:12Z gm$34 !! $Id$ 35 35 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crs.F90
- Property svn:keywords set to Id
r4064 r5350 164 164 165 165 166 !! $Id$ 166 167 CONTAINS 167 168 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
- Property svn:keywords set to Id
r4314 r5350 57 57 # include "domzgr_substitute.h90" 58 58 59 !! $Id$ 59 60 CONTAINS 60 61 … … 1882 1883 CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pval=1.0 ) 1883 1884 1884 CALL wrk_dealloc( jpi, jpj, jpk, zsurf , zsurfmsk)1885 CALL wrk_dealloc( jpi, jpj, jpk, zsurfmsk, zsurf ) 1885 1886 1886 1887 END SUBROUTINE crs_dom_sfc … … 2274 2275 ENDDO 2275 2276 2276 CALL wrk_alloc( jpi_crs, jpj_crs, zmbk )2277 2278 2277 zmbk(:,:) = 0.0 2279 2278 zmbk(:,:) = REAL( mbathy_crs(:,:), wp ) ; CALL crs_lbc_lnk(zmbk,'T',1.0) ; mbathy_crs(:,:) = INT( zmbk(:,:) ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90
- Property svn:keywords set to Id
r4294 r5350 33 33 PUBLIC crs_dom_wri ! routine called by crsini.F90 34 34 35 !! $Id$ 35 36 CONTAINS 36 37 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
- Property svn:keywords set to Id
r4149 r5350 38 38 !!---------------------------------------------------------------------- 39 39 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 40 !! $Id 40 !! $Id$ 41 41 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 42 42 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90
- Property svn:keywords set to Id
r4624 r5350 29 29 # include "domzgr_substitute.h90" 30 30 31 !! $Id$ 31 32 CONTAINS 32 33 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/CRS/crslbclnk.F90
- Property svn:keywords set to Id
r4015 r5350 22 22 PUBLIC crs_lbc_lnk 23 23 24 !! $Id$ 24 25 CONTAINS 25 26 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
r5121 r5350 21 21 USE timing ! preformance summary 22 22 USE wrk_nemo ! working arrays 23 USE fldread ! type FLD_N 24 USE phycst ! physical constant 25 USE in_out_manager ! I/O manager 23 26 24 27 IMPLICIT NONE … … 208 211 REAL(wp) :: zztmp 209 212 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: zsaldta ! Jan/Dec levitus salinity 213 ! reading initial file 214 LOGICAL :: ln_tsd_init !: T & S data flag 215 LOGICAL :: ln_tsd_tradmp !: internal damping toward input data flag 216 CHARACTER(len=100) :: cn_dir 217 TYPE(FLD_N) :: sn_tem,sn_sal 218 INTEGER :: ios=0 219 220 NAMELIST/namtsd/ ln_tsd_init,ln_tsd_tradmp,cn_dir,sn_tem,sn_sal 221 ! 222 223 REWIND( numnam_ref ) ! Namelist namtsd in reference namelist : 224 READ ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 225 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in reference namelist for dia_ar5', lwp ) 226 REWIND( numnam_cfg ) ! Namelist namtsd in configuration namelist : Parameters of the run 227 READ ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 228 902 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in configuration namelist for dia_ar5', lwp ) 229 IF(lwm) WRITE ( numond, namtsd ) 230 ! 210 231 !!---------------------------------------------------------------------- 211 232 ! … … 227 248 END DO 228 249 IF( lk_mpp ) CALL mpp_sum( vol0 ) 229 230 CALL iom_open ( 'data_1m_salinity_nomask', inum )231 CALL iom_get ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,1), 1 )232 CALL iom_get ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,2), 12 )250 251 CALL iom_open ( TRIM( cn_dir )//TRIM(sn_sal%clname), inum ) 252 CALL iom_get ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,1), 1 ) 253 CALL iom_get ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,2), 12 ) 233 254 CALL iom_close( inum ) 234 255 sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) ) -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
- Property svn:keywords set to Id
r4624 r5350 42 42 #endif 43 43 #if defined key_lim3 44 USE par_ice45 44 USE ice 46 45 #endif … … 113 112 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: transports_2d 114 113 114 !! $Id$ 115 115 CONTAINS 116 116 … … 1298 1298 LOGICAL, PUBLIC, PARAMETER :: lk_diadct = .FALSE. !: diamht flag 1299 1299 PUBLIC 1300 !! $Id$ 1300 1301 CONTAINS 1301 1302 -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
- Property svn:keywords set to Id
r4990 r5350 60 60 !!---------------------------------------------------------------------- 61 61 !! NEMO/OPA 3.5 , NEMO Consortium (2013) 62 !! $Id :$62 !! $Id$ 63 63 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 64 64 !!---------------------------------------------------------------------- -
branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
r4990 r5350 8 8 !! 3.2 ! 2010-03 (O. Marti, S. Flavoni) Add fields 9 9 !! 3.3 ! 2010-10 (G. Madec) dynamical allocation 10 !! 3.6 ! 2014-12 (C. Ethe) use of IOM 10 11 !!---------------------------------------------------------------------- 11 12 … … 13 14 !! dia_ptr : Poleward Transport Diagnostics module 14 15 !! dia_ptr_init : Initialization, namelist read 15 !! dia_ptr_wri : Output of poleward fluxes 16 !! ptr_vjk : "zonal" sum computation of a "meridional" flux array 17 !! ptr_tjk : "zonal" mean computation of a tracer field 18 !! ptr_vj : "zonal" and vertical sum computation of a "meridional" flux array 19 !! (Generic interface to ptr_vj_3d, ptr_vj_2d) 16 !! ptr_sjk : "zonal" mean computation of a field - tracer or flux array 17 !! ptr_sj : "zonal" and vertical sum computation of a "meridional" flux array 18 !! (Generic interface to ptr_sj_3d, ptr_sj_2d) 20 19 !!---------------------------------------------------------------------- 21 20 USE oce ! ocean dynamics and active tracers 22 21 USE dom_oce ! ocean space and time domain 23 22 USE phycst ! physical constants 24 USE ldftra_oce ! ocean active tracers: lateral physics 25 USE dianam ! 23 ! 26 24 USE iom ! IOM library 27 USE ioipsl ! IO-IPSL library28 25 USE in_out_manager ! I/O manager 29 26 USE lib_mpp ! MPP library 30 USE lbclnk ! lateral boundary condition - processor exchanges31 27 USE timing ! preformance summary 32 USE wrk_nemo ! working arrays33 28 34 29 IMPLICIT NONE 35 30 PRIVATE 36 31 37 INTERFACE ptr_ vj38 MODULE PROCEDURE ptr_ vj_3d, ptr_vj_2d32 INTERFACE ptr_sj 33 MODULE PROCEDURE ptr_sj_3d, ptr_sj_2d 39 34 END INTERFACE 40 35 41 PUBLIC dia_ptr_init ! call in opa module 36 PUBLIC ptr_sj ! call by tra_ldf & tra_adv routines 37 PUBLIC ptr_sjk ! 38 PUBLIC dia_ptr_init ! call in step module 42 39 PUBLIC dia_ptr ! call in step module 43 PUBLIC ptr_vj ! call by tra_ldf & tra_adv routines44 PUBLIC ptr_vjk ! call by tra_ldf & tra_adv routines45 40 46 41 ! !!** namelist namptr ** 47 LOGICAL , PUBLIC :: ln_diaptr !: Poleward transport flag (T) or not (F) 48 LOGICAL , PUBLIC :: ln_subbas !: Atlantic/Pacific/Indian basins calculation 49 LOGICAL , PUBLIC :: ln_diaznl !: Add zonal means and meridional stream functions 50 LOGICAL , PUBLIC :: ln_ptrcomp !: Add decomposition : overturning (and gyre, soon ...) 51 INTEGER , PUBLIC :: nn_fptr !: frequency of ptr computation [time step] 52 INTEGER , PUBLIC :: nn_fwri