[11403] | 1 | MODULE isfstp |
---|
[4666] | 2 | !!====================================================================== |
---|
[11403] | 3 | !! *** MODULE isfstp *** |
---|
| 4 | !! Surface module : compute iceshelf load, melt and heat flux |
---|
[4666] | 5 | !!====================================================================== |
---|
[9019] | 6 | !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav |
---|
| 7 | !! X.X ! 2006-02 (C. Wang ) Original code bg03 |
---|
| 8 | !! 3.4 ! 2013-03 (P. Mathiot) Merging + parametrization |
---|
[11395] | 9 | !! 4.1 ! 2019-09 (P. Mathiot) Split param/explicit ice shelf and re-organisation |
---|
[4666] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
[11403] | 13 | !! isfstp : compute iceshelf melt and heat flux |
---|
[4666] | 14 | !!---------------------------------------------------------------------- |
---|
[5836] | 15 | ! |
---|
[11395] | 16 | USE isf ! isf variables |
---|
[11852] | 17 | USE isfload, ONLY: isf_load ! ice shelf load |
---|
| 18 | USE isftbl , ONLY: isf_tbl_lvl ! ice shelf boundary layer |
---|
| 19 | USE isfpar , ONLY: isf_par, isf_par_init ! ice shelf parametrisation |
---|
| 20 | USE isfcav , ONLY: isf_cav, isf_cav_init ! ice shelf cavity |
---|
| 21 | USE isfcpl , ONLY: isfcpl_rst_write, isfcpl_init ! isf variables |
---|
[4666] | 22 | |
---|
[11852] | 23 | USE dom_oce, ONLY: ht_n, e3t_n, ln_isfcav, ln_linssh ! ocean space and time domain |
---|
| 24 | USE domvvl, ONLY: ln_vvl_zstar ! zstar logical |
---|
| 25 | USE zdfdrg, ONLY: r_Cdmin_top, r_ke0_top ! vertical physics: top/bottom drag coef. |
---|
| 26 | ! |
---|
| 27 | USE lib_mpp, ONLY: ctl_stop, ctl_nam |
---|
| 28 | USE in_out_manager ! I/O manager |
---|
| 29 | |
---|
[4666] | 30 | IMPLICIT NONE |
---|
[11395] | 31 | |
---|
[4666] | 32 | PRIVATE |
---|
| 33 | |
---|
[11553] | 34 | PUBLIC isf_stp, isf_init, isf_nam ! routine called in sbcmod and divhor |
---|
[4666] | 35 | |
---|
| 36 | !!---------------------------------------------------------------------- |
---|
[9598] | 37 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[5215] | 38 | !! $Id$ |
---|
[10068] | 39 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[4666] | 40 | !!---------------------------------------------------------------------- |
---|
| 41 | CONTAINS |
---|
| 42 | |
---|
[11403] | 43 | SUBROUTINE isf_stp( kt ) |
---|
[5836] | 44 | !!--------------------------------------------------------------------- |
---|
[11403] | 45 | !! *** ROUTINE isf_stp *** |
---|
[6140] | 46 | !! |
---|
[11403] | 47 | !! ** Purpose : compute total heat flux and total fwf due to ice shelf melt |
---|
[6140] | 48 | !! |
---|
[11403] | 49 | !! ** Method : For each case (parametrisation or explicity cavity) : |
---|
| 50 | !! - define the before fields |
---|
| 51 | !! - compute top boundary layer properties |
---|
| 52 | !! (in case of parametrisation, this is the |
---|
| 53 | !! depth range model array used to compute mean far fields properties) |
---|
| 54 | !! - compute fluxes |
---|
| 55 | !! - write restart variables |
---|
[11395] | 56 | !! |
---|
[6140] | 57 | !!---------------------------------------------------------------------- |
---|
[9019] | 58 | INTEGER, INTENT(in) :: kt ! ocean time step |
---|
[4666] | 59 | !!--------------------------------------------------------------------- |
---|
| 60 | ! |
---|
[11395] | 61 | IF ( ln_isfcav_mlt ) THEN |
---|
[9019] | 62 | ! |
---|
[11395] | 63 | ! before time step |
---|
| 64 | IF ( kt /= nit000 ) THEN |
---|
| 65 | risf_cav_tsc_b (:,:,:) = risf_cav_tsc (:,:,:) |
---|
| 66 | fwfisf_cav_b(:,:) = fwfisf_cav(:,:) |
---|
| 67 | END IF |
---|
[7788] | 68 | ! |
---|
[11395] | 69 | ! compute tbl lvl/h |
---|
[11541] | 70 | rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) |
---|
[11395] | 71 | CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) |
---|
| 72 | ! |
---|
| 73 | ! compute ice shelf melt |
---|
| 74 | CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav) |
---|
| 75 | ! |
---|
| 76 | END IF |
---|
[9019] | 77 | ! |
---|
[11395] | 78 | IF ( ln_isfpar_mlt ) THEN |
---|
[4666] | 79 | ! |
---|
[11395] | 80 | ! before time step |
---|
| 81 | IF ( kt /= nit000 ) THEN |
---|
[11423] | 82 | risf_par_tsc_b(:,:,:) = risf_par_tsc(:,:,:) |
---|
| 83 | fwfisf_par_b (:,:) = fwfisf_par (:,:) |
---|
[11395] | 84 | END IF |
---|
[4666] | 85 | ! |
---|
[11395] | 86 | ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) |
---|
[11541] | 87 | rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) |
---|
[11395] | 88 | CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) |
---|
| 89 | ! |
---|
| 90 | ! compute ice shelf melt |
---|
| 91 | CALL isf_par( kt, risf_par_tsc, fwfisf_par) |
---|
| 92 | ! |
---|
| 93 | END IF |
---|
| 94 | ! |
---|
[11852] | 95 | IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) |
---|
| 96 | ! |
---|
[11403] | 97 | END SUBROUTINE isf_stp |
---|
[4666] | 98 | |
---|
[11553] | 99 | SUBROUTINE isf_init |
---|
[6140] | 100 | !!--------------------------------------------------------------------- |
---|
[11403] | 101 | !! *** ROUTINE isfstp_init *** |
---|
[6140] | 102 | !! |
---|
[11403] | 103 | !! ** Purpose : Initialisation of the ice shelf public variables |
---|
[6140] | 104 | !! |
---|
[11823] | 105 | !! ** Method : Read the namisf namelist, check option compatibility and set derived parameters |
---|
[11395] | 106 | !! |
---|
[11823] | 107 | !! ** Action : - read namisf parameters |
---|
[11403] | 108 | !! - allocate memory |
---|
[11823] | 109 | !! - output print |
---|
| 110 | !! - ckeck option compatibility |
---|
| 111 | !! - call cav/param/isfcpl init routine |
---|
[5836] | 112 | !!---------------------------------------------------------------------- |
---|
[11403] | 113 | ! |
---|
[11553] | 114 | ! constrain: l_isfoasis need to be known |
---|
| 115 | ! |
---|
| 116 | ! Read namelist |
---|
| 117 | CALL isf_nam() |
---|
| 118 | ! |
---|
[11403] | 119 | ! Allocate public array |
---|
| 120 | CALL isf_alloc() |
---|
| 121 | ! |
---|
[11553] | 122 | ! check option compatibility |
---|
| 123 | CALL isf_ctl() |
---|
[11403] | 124 | ! |
---|
[11553] | 125 | ! compute ice shelf load |
---|
| 126 | IF ( ln_isfcav ) CALL isf_load( risfload ) |
---|
[11403] | 127 | ! |
---|
[11553] | 128 | ! terminate routine now if no ice shelf melt formulation specify |
---|
| 129 | IF ( ln_isf ) THEN |
---|
| 130 | ! |
---|
| 131 | !--------------------------------------------------------------------------------------------------------------------- |
---|
| 132 | ! initialisation melt in the cavity |
---|
[11852] | 133 | IF ( ln_isfcav_mlt ) CALL isf_cav_init() |
---|
[11553] | 134 | ! |
---|
| 135 | !--------------------------------------------------------------------------------------------------------------------- |
---|
| 136 | ! initialisation parametrised melt |
---|
[11852] | 137 | IF ( ln_isfpar_mlt ) CALL isf_par_init() |
---|
[11553] | 138 | ! |
---|
[11852] | 139 | !--------------------------------------------------------------------------------------------------------------------- |
---|
| 140 | ! initialisation ice sheet coupling |
---|
| 141 | IF( ln_isfcpl ) CALL isfcpl_init() |
---|
| 142 | ! |
---|
[11553] | 143 | END IF |
---|
| 144 | |
---|
| 145 | END SUBROUTINE isf_init |
---|
| 146 | |
---|
[11823] | 147 | SUBROUTINE isf_ctl() |
---|
| 148 | !!--------------------------------------------------------------------- |
---|
| 149 | !! *** ROUTINE isf_ctl *** |
---|
| 150 | !! |
---|
| 151 | !! ** Purpose : output print and option compatibility check |
---|
| 152 | !! |
---|
| 153 | !!---------------------------------------------------------------------- |
---|
[11423] | 154 | IF (lwp) THEN |
---|
| 155 | WRITE(numout,*) |
---|
| 156 | WRITE(numout,*) 'isf_init : ice shelf initialisation' |
---|
| 157 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
| 158 | WRITE(numout,*) ' Namelist namisf :' |
---|
| 159 | ! |
---|
[11489] | 160 | WRITE(numout,*) ' ice shelf cavity (open or parametrised) ln_isf = ', ln_isf |
---|
[11553] | 161 | WRITE(numout,*) |
---|
[11489] | 162 | ! |
---|
| 163 | IF ( ln_isf ) THEN |
---|
| 164 | WRITE(numout,*) ' melt inside the cavity ln_isfcav_mlt = ', ln_isfcav_mlt |
---|
[11541] | 165 | IF ( ln_isfcav_mlt) THEN |
---|
[11489] | 166 | WRITE(numout,*) ' melt formulation cn_isfcav_mlt = ', TRIM(cn_isfcav_mlt) |
---|
| 167 | WRITE(numout,*) ' thickness of the top boundary layer rn_htbl = ', rn_htbl |
---|
| 168 | WRITE(numout,*) ' gamma formulation cn_gammablk = ', TRIM(cn_gammablk) |
---|
| 169 | IF ( TRIM(cn_gammablk) .NE. 'spe' ) THEN |
---|
[11852] | 170 | WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0 |
---|
| 171 | WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0 |
---|
| 172 | WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top |
---|
| 173 | WRITE(numout,*) ' top background ke used (from namdrg_top) rn_ke0 = ', r_ke0_top |
---|
[11489] | 174 | END IF |
---|
[11423] | 175 | END IF |
---|
[11489] | 176 | WRITE(numout,*) '' |
---|
| 177 | ! |
---|
[11553] | 178 | WRITE(numout,*) ' ice shelf melt parametrisation ln_isfpar_mlt = ', ln_isfpar_mlt |
---|
[11489] | 179 | IF ( ln_isfpar_mlt ) THEN |
---|
| 180 | WRITE(numout,*) ' isf parametrisation formulation cn_isfpar_mlt = ', TRIM(cn_isfpar_mlt) |
---|
| 181 | END IF |
---|
| 182 | WRITE(numout,*) '' |
---|
| 183 | ! |
---|
[11553] | 184 | WRITE(numout,*) ' Coupling to an ice sheet model ln_isfcpl = ', ln_isfcpl |
---|
[11541] | 185 | IF ( ln_isfcpl ) THEN |
---|
[11553] | 186 | WRITE(numout,*) ' conservation activated ln_isfcpl_cons = ', ln_isfcpl_cons |
---|
| 187 | WRITE(numout,*) ' number of call of the extrapolation loop = ', nn_drown |
---|
[11541] | 188 | ENDIF |
---|
| 189 | WRITE(numout,*) '' |
---|
| 190 | ! |
---|
[11489] | 191 | ELSE |
---|
[11541] | 192 | |
---|
[11489] | 193 | IF ( ln_isfcav ) THEN |
---|
| 194 | WRITE(numout,*) '' |
---|
| 195 | WRITE(numout,*) ' W A R N I N G: ice shelf cavities are open BUT no melt will be computed or read from file !' |
---|
| 196 | WRITE(numout,*) '' |
---|
| 197 | END IF |
---|
[6140] | 198 | END IF |
---|
[11489] | 199 | |
---|
[11521] | 200 | IF (ln_isfcav) WRITE(numout,*) ' Ice shelf load method cn_isfload = ', TRIM(cn_isfload) |
---|
| 201 | WRITE(numout,*) '' |
---|
| 202 | |
---|
[11489] | 203 | END IF |
---|
| 204 | ! |
---|
[11553] | 205 | |
---|
[11489] | 206 | !--------------------------------------------------------------------------------------------------------------------- |
---|
[11553] | 207 | ! sanity check ! issue ln_isfcav not yet known as well as l_isfoasis => move this call in isf_stp ? |
---|
[11403] | 208 | ! melt in the cavity without cavity |
---|
[11553] | 209 | IF ( ln_isfcav_mlt .AND. (.NOT. ln_isfcav) ) & |
---|
| 210 | & CALL ctl_stop('ice shelf melt in the cavity activated (ln_isfcav_mlt) but no cavity detected in domcfg (ln_isfcav), STOP' ) |
---|
[6140] | 211 | ! |
---|
[11489] | 212 | ! ice sheet coupling without cavity |
---|
| 213 | IF ( ln_isfcpl .AND. (.NOT. ln_isfcav) ) & |
---|
| 214 | & CALL ctl_stop('coupling with an ice sheet model detected (ln_isfcpl) but no cavity detected in domcfg (ln_isfcav), STOP' ) |
---|
| 215 | ! |
---|
[11423] | 216 | IF ( ln_isfcpl .AND. ln_isfcpl_cons .AND. ln_linssh ) & |
---|
| 217 | & CALL ctl_stop( 'The coupling between NEMO and an ice sheet model with the conservation option does not work with the linssh option' ) |
---|
| 218 | ! |
---|
[11553] | 219 | IF ( l_isfoasis .AND. .NOT. ln_isf ) CALL ctl_stop( ' OASIS send ice shelf fluxes to NEMO but NEMO does not have the isf module activated' ) |
---|
| 220 | ! |
---|
| 221 | IF ( l_isfoasis .AND. ln_isf ) THEN |
---|
[11403] | 222 | ! |
---|
| 223 | CALL ctl_stop( ' ln_ctl and ice shelf not tested' ) |
---|
| 224 | ! |
---|
| 225 | ! NEMO coupled to ATMO model with isf cavity need oasis method for melt computation |
---|
[11423] | 226 | IF ( ln_isfcav_mlt .AND. TRIM(cn_isfcav_mlt) /= 'oasis' ) CALL ctl_stop( 'cn_isfcav_mlt = oasis is the only option availble if fwf send by oasis' ) |
---|
| 227 | IF ( ln_isfpar_mlt .AND. TRIM(cn_isfpar_mlt) /= 'oasis' ) CALL ctl_stop( 'cn_isfpar_mlt = oasis is the only option availble if fwf send by oasis' ) |
---|
[11403] | 228 | ! |
---|
| 229 | ! oasis melt computation not tested (coded but not tested) |
---|
| 230 | IF ( ln_isfcav_mlt .OR. ln_isfpar_mlt ) THEN |
---|
| 231 | IF ( TRIM(cn_isfcav_mlt) == 'oasis' ) CALL ctl_stop( 'cn_isfcav_mlt = oasis not tested' ) |
---|
| 232 | IF ( TRIM(cn_isfpar_mlt) == 'oasis' ) CALL ctl_stop( 'cn_isfpar_mlt = oasis not tested' ) |
---|
| 233 | END IF |
---|
| 234 | ! |
---|
| 235 | ! oasis melt computation with cavity open and cavity parametrised (not coded) |
---|
| 236 | IF ( ln_isfcav_mlt .AND. ln_isfpar_mlt ) THEN |
---|
| 237 | IF ( TRIM(cn_isfpar_mlt) == 'oasis' .AND. TRIM(cn_isfcav_mlt) == 'oasis' ) CALL ctl_stop( 'cn_isfpar_mlt = oasis and cn_isfcav_mlt = oasis not coded' ) |
---|
| 238 | END IF |
---|
[11553] | 239 | ! |
---|
[11823] | 240 | ! compatibility ice shelf and vvl |
---|
| 241 | IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) |
---|
| 242 | ! |
---|
[11403] | 243 | END IF |
---|
[11553] | 244 | END SUBROUTINE isf_ctl |
---|
| 245 | ! |
---|
| 246 | SUBROUTINE isf_nam |
---|
| 247 | !!--------------------------------------------------------------------- |
---|
| 248 | !! *** ROUTINE isf_nam *** |
---|
| 249 | !! |
---|
| 250 | !! ** Purpose : Read ice shelf namelist cfg and ref |
---|
| 251 | !! |
---|
| 252 | !!---------------------------------------------------------------------- |
---|
| 253 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 254 | !!---------------------------------------------------------------------- |
---|
| 255 | NAMELIST/namisf/ ln_isf , & |
---|
| 256 | & ln_isfcav_mlt, cn_isfcav_mlt, cn_gammablk, rn_gammat0, rn_gammas0, rn_htbl, sn_isfcav_fwf, & |
---|
| 257 | & ln_isfpar_mlt, cn_isfpar_mlt, sn_isfpar_fwf, sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & |
---|
| 258 | & ln_isfcpl , nn_drown, ln_isfcpl_cons, & |
---|
| 259 | & cn_isfload , cn_isfdir |
---|
| 260 | !!---------------------------------------------------------------------- |
---|
[9019] | 261 | ! |
---|
[11553] | 262 | REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs |
---|
| 263 | READ ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) |
---|
| 264 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist', lwp ) |
---|
| 265 | ! |
---|
| 266 | REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs |
---|
| 267 | READ ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) |
---|
| 268 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist', lwp ) |
---|
| 269 | IF(lwm) WRITE ( numond, namisf ) |
---|
| 270 | |
---|
| 271 | END SUBROUTINE isf_nam |
---|
| 272 | !! |
---|
[6140] | 273 | !!====================================================================== |
---|
[11403] | 274 | END MODULE isfstp |
---|