[825] | 1 | MODULE thd_ice |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE thd_ice *** |
---|
| 4 | !! LIM sea-ice : Ice thermodynamics in 1D |
---|
| 5 | !!===================================================================== |
---|
[2715] | 6 | !! History : 3.0 ! 2002-11 (C. Ethe) F90: Free form and module |
---|
[825] | 7 | !!---------------------------------------------------------------------- |
---|
[2715] | 8 | USE par_ice ! LIM-3 parameters |
---|
| 9 | USE in_out_manager ! I/O manager |
---|
[3625] | 10 | USE lib_mpp ! MPP library |
---|
[825] | 11 | |
---|
| 12 | IMPLICIT NONE |
---|
| 13 | PRIVATE |
---|
| 14 | |
---|
[2715] | 15 | PUBLIC thd_ice_alloc ! Routine called by nemogcm.F90 |
---|
| 16 | |
---|
[834] | 17 | !!--------------------------- |
---|
[825] | 18 | !! * Share Module variables |
---|
[834] | 19 | !!--------------------------- |
---|
[2715] | 20 | ! !!! ** ice-thermo namelist (namicethd) ** |
---|
| 21 | REAL(wp), PUBLIC :: hmelt = -0.15 !: maximum melting at the bottom; active only for one category |
---|
| 22 | REAL(wp), PUBLIC :: hicmin = 0.2 !: (REMOVE) |
---|
| 23 | REAL(wp), PUBLIC :: hiclim = 0.05 !: minimum ice thickness |
---|
| 24 | REAL(wp), PUBLIC :: sbeta = 1.0 !: numerical scheme for diffusion in ice (REMOVE) |
---|
| 25 | REAL(wp), PUBLIC :: parlat = 0.0 !: (REMOVE) |
---|
| 26 | REAL(wp), PUBLIC :: hakspl = 0.5 !: (REMOVE) |
---|
| 27 | REAL(wp), PUBLIC :: hibspl = 0.5 !: (REMOVE) |
---|
| 28 | REAL(wp), PUBLIC :: exld = 2.0 !: (REMOVE) |
---|
| 29 | REAL(wp), PUBLIC :: hakdif = 1.0 !: (REMOVE) |
---|
| 30 | REAL(wp), PUBLIC :: thth = 0.2 !: (REMOVE) |
---|
| 31 | REAL(wp), PUBLIC :: hnzst = 0.1 !: thick. of the surf. layer in temp. comp. |
---|
| 32 | REAL(wp), PUBLIC :: parsub = 1.0 !: switch for snow sublimation or not |
---|
| 33 | REAL(wp), PUBLIC :: alphs = 1.0 !: coef. for snow density when snow-ice formation |
---|
| 34 | REAL(wp), PUBLIC :: fraz_swi= 1.0 !: use of frazil ice collection in function of wind (1.0) or not (0.0) |
---|
| 35 | REAL(wp), PUBLIC :: maxfrazb= 0.7 !: maximum portion of frazil ice collecting at the ice bottom |
---|
| 36 | REAL(wp), PUBLIC :: vfrazb = 0.41667 !: threshold drift speed for collection of bottom frazil ice |
---|
| 37 | REAL(wp), PUBLIC :: Cfrazb = 5.0 !: squeezing coefficient for collection of bottom frazil ice |
---|
[825] | 38 | |
---|
[2715] | 39 | REAL(wp), PUBLIC, DIMENSION(2) :: hiccrit = (/0.3,0.3/) !: ice th. for lateral accretion in the NH (SH) (m) |
---|
[825] | 40 | |
---|
[834] | 41 | !!----------------------------- |
---|
| 42 | !! * Share 1D Module variables |
---|
| 43 | !!----------------------------- |
---|
| 44 | !: In ice thermodynamics, to spare memory, the vectors are folded |
---|
| 45 | !: from 1D to 2D vectors. The following variables, with ending _1d (or _b) |
---|
| 46 | !: are the variables corresponding to 2d vectors |
---|
[825] | 47 | |
---|
[2715] | 48 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: npb !: number of points where computations has to be done |
---|
| 49 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: npac !: correspondance between points (lateral accretion) |
---|
[825] | 50 | |
---|
[2715] | 51 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qldif_1d !: <==> the 2D qldif |
---|
| 52 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qcmif_1d !: <==> the 2D qcmif |
---|
| 53 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fstbif_1d !: <==> the 2D fstric |
---|
| 54 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fltbif_1d !: <==> the 2D ffltbif |
---|
| 55 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fscbq_1d !: <==> the 2D fscmcbq |
---|
| 56 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qsr_ice_1d !: <==> the 2D qsr_ice |
---|
| 57 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fr1_i0_1d !: <==> the 2D fr1_i0 |
---|
| 58 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fr2_i0_1d !: <==> the 2D fr2_i0 |
---|
| 59 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qnsr_ice_1d !: <==> the 2D qns_ice |
---|
| 60 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qfvbq_1d !: <==> the 2D qfvbq |
---|
| 61 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: t_bo_b !: <==> the 2D t_bo |
---|
[825] | 62 | |
---|
[2715] | 63 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sprecip_1d !: <==> the 2D sprecip |
---|
| 64 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: frld_1d !: <==> the 2D frld |
---|
| 65 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: at_i_b !: <==> the 2D frld |
---|
| 66 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fbif_1d !: <==> the 2D fbif |
---|
[3625] | 67 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdm_ice_1d !: <==> the 2D rdm_ice |
---|
[4506] | 68 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdq_ice_1d !: <==> the 2D rdq_ice |
---|
[3625] | 69 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdm_snw_1d !: <==> the 2D rdm_snw |
---|
[4506] | 70 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdq_snw_1d !: <==> the 2D rdq_snw |
---|
[2715] | 71 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qlbbq_1d !: <==> the 2D qlbsbq |
---|
| 72 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dmgwi_1d !: <==> the 2D dmgwi |
---|
| 73 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dvsbq_1d !: <==> the 2D rdvosif |
---|
| 74 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dvbbq_1d !: <==> the 2D rdvobif |
---|
| 75 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dvlbq_1d !: <==> the 2D rdvolif |
---|
| 76 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dvnbq_1d !: <==> the 2D rdvolif |
---|
| 77 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dqns_ice_1d !: <==> the 2D dqns_ice |
---|
| 78 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qla_ice_1d !: <==> the 2D qla_ice |
---|
| 79 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dqla_ice_1d !: <==> the 2D dqla_ice |
---|
| 80 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: tatm_ice_1d !: <==> the 2D tatm_ice |
---|
| 81 | ! ! to reintegrate longwave flux inside the ice thermodynamics |
---|
| 82 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fsup !: Energy flux sent from bottom to lateral ablation if |dhb|> 0.15 m |
---|
| 83 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: focea !: Remaining energy in case of total ablation |
---|
| 84 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: i0 !: fraction of radiation transmitted to the ice |
---|
| 85 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: old_ht_i_b !: Ice thickness at the beginnning of the time step [m] |
---|
[3625] | 86 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: old_ht_s_b !: Snow thickness at the beginning of the time step [m] |
---|
| 87 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_bri_1d !: <==> the 2D sfx_bri |
---|
[2715] | 88 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fhbri_1d !: Heat flux due to brine drainage |
---|
[3625] | 89 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_thd_1d !: <==> the 2D sfx_thd |
---|
[2715] | 90 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_fl_1d !: Ice salinity variations due to flushing |
---|
| 91 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_gd_1d !: Ice salinity variations due to gravity drainage |
---|
| 92 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_se_1d !: Ice salinity variations due to basal salt entrapment |
---|
| 93 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_si_1d !: Ice salinity variations due to lateral accretion |
---|
| 94 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hicol_b !: Ice collection thickness accumulated in fleads |
---|
[825] | 95 | |
---|
[2715] | 96 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: t_su_b !: <==> the 2D t_su |
---|
| 97 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: a_i_b !: <==> the 2D a_i |
---|
| 98 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ht_i_b !: <==> the 2D ht_s |
---|
| 99 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ht_s_b !: <==> the 2D ht_i |
---|
| 100 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_su !: Surface Conduction flux |
---|
| 101 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_bo_i !: Bottom Conduction flux |
---|
| 102 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_s_tot !: Snow accretion/ablation [m] |
---|
| 103 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_i_surf !: Ice surface accretion/ablation [m] |
---|
| 104 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_i_bott !: Ice bottom accretion/ablation [m] |
---|
| 105 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_snowice !: Snow ice formation [m of ice] |
---|
| 106 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sm_i_b !: Ice bulk salinity [ppt] |
---|
| 107 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: s_i_new !: Salinity of new ice at the bottom |
---|
| 108 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: s_snowice !: Salinity of new snow ice on top of the ice |
---|
| 109 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: o_i_b !: Ice age [days] |
---|
[825] | 110 | |
---|
[4045] | 111 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: iatte_1d !: clem attenuation coef of the input solar flux (unitless) |
---|
| 112 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: oatte_1d !: clem attenuation coef of the input solar flux (unitless) |
---|
| 113 | |
---|
[2715] | 114 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_s_b !: corresponding to the 2D var t_s |
---|
| 115 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_i_b !: corresponding to the 2D var t_i |
---|
| 116 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: s_i_b !: profiled ice salinity |
---|
| 117 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_i_b !: Ice enthalpy per unit volume |
---|
| 118 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_s_b !: Snow enthalpy per unit volume |
---|
[825] | 119 | |
---|
[921] | 120 | ! Clean the following ... |
---|
| 121 | ! These variables are coded for conservation checks |
---|
[2715] | 122 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qt_i_in !: ice energy summed over categories (initial) |
---|
| 123 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qt_i_fin !: ice energy summed over categories (final) |
---|
| 124 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qt_s_in, qt_s_fin !: snow energy summed over categories |
---|
| 125 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: dq_i, sum_fluxq !: increment of energy, sum of fluxes |
---|
| 126 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fatm, foce !: atmospheric, oceanic, heat flux |
---|
| 127 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cons_error, surf_error !: conservation, surface error |
---|
[825] | 128 | |
---|
[2715] | 129 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_i_layer_in !: goes to trash |
---|
| 130 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_i_layer_fin !: goes to trash |
---|
| 131 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: dq_i_layer, radab !: goes to trash |
---|
[825] | 132 | |
---|
[2715] | 133 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ftotal_in !: initial total heat flux |
---|
| 134 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ftotal_fin !: final total heat flux |
---|
[825] | 135 | |
---|
[2715] | 136 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fc_s |
---|
| 137 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fc_i |
---|
| 138 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: de_s_lay |
---|
| 139 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: de_i_lay |
---|
| 140 | |
---|
| 141 | INTEGER , PUBLIC :: jiindex_1d ! 1D index of debugging point |
---|
[825] | 142 | |
---|
[2715] | 143 | !!---------------------------------------------------------------------- |
---|
[4045] | 144 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[2715] | 145 | !! $Id$ |
---|
| 146 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 147 | !!---------------------------------------------------------------------- |
---|
| 148 | CONTAINS |
---|
| 149 | |
---|
| 150 | FUNCTION thd_ice_alloc() |
---|
| 151 | !!---------------------------------------------------------------------! |
---|
| 152 | !! *** ROUTINE thd_ice_alloc *** |
---|
| 153 | !!---------------------------------------------------------------------! |
---|
| 154 | INTEGER :: thd_ice_alloc ! return value |
---|
| 155 | INTEGER :: ierr(4) |
---|
| 156 | !!---------------------------------------------------------------------! |
---|
| 157 | |
---|
| 158 | ALLOCATE( npb (jpij) , npac (jpij), & |
---|
| 159 | ! ! |
---|
| 160 | & qldif_1d (jpij) , qcmif_1d (jpij) , fstbif_1d (jpij) , & |
---|
| 161 | & fltbif_1d(jpij) , fscbq_1d (jpij) , qsr_ice_1d (jpij) , & |
---|
| 162 | & fr1_i0_1d(jpij) , fr2_i0_1d(jpij) , qnsr_ice_1d(jpij) , & |
---|
[4045] | 163 | & qfvbq_1d (jpij) , t_bo_b (jpij) , iatte_1d (jpij) , & |
---|
| 164 | & oatte_1d (jpij) , STAT=ierr(1) ) |
---|
[2715] | 165 | ! |
---|
| 166 | ALLOCATE( sprecip_1d (jpij) , frld_1d (jpij) , at_i_b (jpij) , & |
---|
[3625] | 167 | & fbif_1d (jpij) , rdm_ice_1d (jpij) , rdm_snw_1d (jpij) , & |
---|
[4506] | 168 | & rdq_ice_1d (jpij) , rdq_snw_1d (jpij) , & !MV HC 2014 |
---|
[2715] | 169 | & qlbbq_1d (jpij) , dmgwi_1d (jpij) , dvsbq_1d (jpij) , & |
---|
| 170 | & dvbbq_1d (jpij) , dvlbq_1d (jpij) , dvnbq_1d (jpij) , & |
---|
| 171 | & dqns_ice_1d(jpij) , qla_ice_1d (jpij) , dqla_ice_1d(jpij) , & |
---|
| 172 | & tatm_ice_1d(jpij) , fsup (jpij) , focea (jpij) , & |
---|
| 173 | & i0 (jpij) , old_ht_i_b (jpij) , old_ht_s_b (jpij) , & |
---|
[3625] | 174 | & sfx_bri_1d (jpij) , fhbri_1d (jpij) , sfx_thd_1d (jpij) , & |
---|
[2715] | 175 | & dsm_i_fl_1d(jpij) , dsm_i_gd_1d(jpij) , dsm_i_se_1d(jpij) , & |
---|
| 176 | & dsm_i_si_1d(jpij) , hicol_b (jpij) , STAT=ierr(2) ) |
---|
| 177 | ! |
---|
| 178 | ALLOCATE( t_su_b (jpij) , a_i_b (jpij) , ht_i_b (jpij) , & |
---|
| 179 | & ht_s_b (jpij) , fc_su (jpij) , fc_bo_i (jpij) , & |
---|
| 180 | & dh_s_tot (jpij) , dh_i_surf(jpij) , dh_i_bott(jpij) , & |
---|
| 181 | & dh_snowice(jpij) , sm_i_b (jpij) , s_i_new (jpij) , & |
---|
| 182 | & s_snowice (jpij) , o_i_b (jpij) , & |
---|
| 183 | ! ! |
---|
| 184 | & t_s_b(jpij,nlay_s), & |
---|
| 185 | ! ! |
---|
| 186 | & t_i_b(jpij,jkmax), s_i_b(jpij,jkmax) , & |
---|
| 187 | & q_i_b(jpij,jkmax), q_s_b(jpij,jkmax) , STAT=ierr(3)) |
---|
| 188 | ! |
---|
| 189 | ALLOCATE( qt_i_in (jpij,jpl) , qt_i_fin(jpij,jpl) , qt_s_in (jpij,jpl) , & |
---|
| 190 | & qt_s_fin (jpij,jpl) , dq_i (jpij,jpl) , sum_fluxq (jpij,jpl) , & |
---|
| 191 | & fatm (jpij,jpl) , foce (jpij,jpl) , cons_error(jpij,jpl) , & |
---|
| 192 | & surf_error(jpij,jpl) , & |
---|
| 193 | ! ! |
---|
| 194 | & q_i_layer_in(jpij,jkmax) , q_i_layer_fin(jpij,jkmax) , & |
---|
| 195 | & dq_i_layer (jpij,jkmax) , radab (jpij,jkmax) , & |
---|
| 196 | ! ! |
---|
| 197 | & ftotal_in(jpij), ftotal_fin(jpij) , & |
---|
| 198 | ! ! |
---|
| 199 | & fc_s(jpij,0:nlay_s) , de_s_lay(jpij,nlay_s) , & |
---|
| 200 | & fc_i(jpij,0:jkmax) , de_i_lay(jpij,jkmax) , STAT=ierr(4) ) |
---|
| 201 | |
---|
| 202 | thd_ice_alloc = MAXVAL( ierr ) |
---|
| 203 | |
---|
| 204 | IF( thd_ice_alloc /= 0 ) CALL ctl_warn( 'thd_ice_alloc: failed to allocate arrays.' ) |
---|
| 205 | ! |
---|
| 206 | END FUNCTION thd_ice_alloc |
---|
| 207 | |
---|
[825] | 208 | !!====================================================================== |
---|
| 209 | END MODULE thd_ice |
---|