Changeset 11852
- Timestamp:
- 2019-11-04T19:00:27+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90
r11823 r11852 96 96 #endif 97 97 ! 98 IF( ln_rnf ) CALL sbc_rnf_div( hdivn ) !== runoffs ==! (update hdivn field)98 IF( ln_rnf ) CALL sbc_rnf_div( hdivn ) !== runoffs ==! (update hdivn field) 99 99 ! 100 100 #if defined key_asminc … … 103 103 #endif 104 104 ! 105 IF( ln_isf .AND. kt /= 0 ) CALL isf_hdiv( kt, hdivn ) !== ice shelf==! (update hdivn field)105 IF( ln_isf ) CALL isf_hdiv( kt, hdivn ) !== ice shelf ==! (update hdivn field) 106 106 ! 107 107 CALL lbc_lnk( 'divhor', hdivn, 'T', 1. ) ! (no sign change) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90
r11844 r11852 14 14 !!---------------------------------------------------------------------- 15 15 16 USE in_out_manager ! I/O manager17 USE lib_mpp ! MPP library16 USE in_out_manager, ONLY: wp, jpi,jpj, jpk, jpts ! I/O manager 17 USE lib_mpp , ONLY: ctl_stop, mpp_sum ! MPP library 18 18 USE fldread ! read input fields 19 19 … … 197 197 ! 198 198 CALL mpp_sum ( 'isf', ierr ) 199 IF( ierr /= 0 ) CALL ctl_ warn('STOP','isfcpl: failed to allocate arrays.')199 IF( ierr /= 0 ) CALL ctl_stop('STOP','isfcpl: failed to allocate arrays.') 200 200 ! 201 201 END SUBROUTINE isf_alloc_cpl -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90
r11844 r11852 13 13 !! isf_cav : update ice shelf melting under ice shelf 14 14 !!---------------------------------------------------------------------- 15 USE oce ! ocean dynamics and tracers16 15 USE isf ! ice shelf public variables 17 USE isfutils 18 USE isftbl ! ice shelf top boundary layer properties 19 USE isfcavmlt ! ice shelf melt formulation 20 USE isfcavgam ! ice shelf melt exchange coeficient 21 USE isfdiags ! ice shelf diags 22 USE dom_oce ! ocean space and time domain 23 USE phycst ! physical constants 24 USE eosbn2 ! l_useCT 16 ! 17 USE isfrst , ONLY: isfrst_write, isfrst_read ! ice shelf restart read/write subroutine 18 USE isfutils , ONLY: debug ! ice shelf debug subroutine 19 USE isftbl , ONLY: isf_tbl ! ice shelf top boundary layer properties subroutine 20 USE isfcavmlt, ONLY: isfcav_mlt ! ice shelf melt formulation subroutine 21 USE isfcavgam, ONLY: isfcav_gammats ! ice shelf melt exchange coeficient subroutine 22 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine 23 ! 24 USE oce , ONLY: tsn ! ocean tracers 25 USE dom_oce , ONLY: jpi,jpj ! ocean space and time domain 26 USE phycst , ONLY: grav,rau0,r1_rau0_rcp ! physical constants 27 USE eosbn2 , ONLY: l_useCT ! l_useCT 25 28 ! 26 29 USE in_out_manager ! I/O manager … … 58 61 !!--------------------------------------------------------------------- 59 62 !!-------------------------- OUT -------------------------------------- 60 REAL(wp), DIMENSION(jpi,jpj) , INTENT(inout) :: pqfwf 61 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc 63 REAL(wp), DIMENSION(jpi,jpj) , INTENT(inout) :: pqfwf ! ice shelf melt (>0 out) 64 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc ! T & S ice shelf cavity contents 62 65 !!-------------------------- IN -------------------------------------- 63 66 INTEGER, INTENT(in) :: kt ! ocean time step … … 66 69 INTEGER :: nit 67 70 REAL(wp) :: zerr 68 REAL(wp), DIMENSION(jpi,jpj) :: zqlat, zqoce, zqhc, zqh 69 REAL(wp), DIMENSION(jpi,jpj) :: zqoce_b 70 REAL(wp), DIMENSION(jpi,jpj) :: zgammat, zgammas 71 REAL(wp), DIMENSION(jpi,jpj) :: zttbl, zstbl 71 REAL(wp), DIMENSION(jpi,jpj) :: zqlat, zqoce, zqhc, zqh ! heat fluxes 72 REAL(wp), DIMENSION(jpi,jpj) :: zqoce_b ! 73 REAL(wp), DIMENSION(jpi,jpj) :: zgammat, zgammas ! exchange coeficient 74 REAL(wp), DIMENSION(jpi,jpj) :: zttbl, zstbl ! temp. and sal. in top boundary layer 72 75 !!--------------------------------------------------------------------- 73 76 ! … … 140 143 ptsc(:,:,jp_tem) = - zqh(:,:) * r1_rau0_rcp 141 144 ! 145 ! write restart variables (qoceisf, qhcisf, fwfisf for now and before) 146 IF (lrst_oce) CALL isfrst_write(kt, 'cav', ptsc, pqfwf) 147 ! 142 148 IF ( ln_isfdebug ) THEN 143 149 CALL debug('isf_cav: ptsc T',ptsc(:,:,1)) … … 158 164 !!--------------------------------------------------------------------- 159 165 160 ! allocation isfcav gamtisf, gamsisf, 166 ! 0: allocation 167 ! 161 168 CALL isf_alloc_cav() 162 169 ! 163 ! cav 170 ! 1: initialisation 171 ! 172 ! top and bottom level of the 'top boundary layer' 164 173 misfkt_cav(:,:) = mikt(:,:) ; misfkb_cav(:,:) = 1 174 ! 175 ! thickness of 'tbl' and fraction of bottom cell affected by 'tbl' 165 176 rhisf_tbl_cav(:,:) = 0.0_wp ; rfrac_tbl_cav(:,:) = 0.0_wp 177 ! 178 ! cavity mask 179 mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:) 180 ! 181 ! 2: read restart 182 ! 183 ! read cav variable from restart 184 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 185 ! 186 ! 3: specific allocation and initialisation (depending of scheme choice) 166 187 ! 167 188 SELECT CASE ( TRIM(cn_isfcav_mlt) ) … … 199 220 END SELECT 200 221 ! 201 ! compute mask202 mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:)203 !204 222 END SUBROUTINE isf_cav_init 205 223 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90
r11844 r11852 10 10 !! isfcav_gammats : compute exchange coeficient gamma 11 11 !!---------------------------------------------------------------------- 12 USE oce ! ocean dynamics and tracers13 12 USE isf 14 USE isfutils 15 USE isftbl 13 USE isfutils, ONLY: debug 14 USE isftbl , ONLY: isf_tbl 15 16 USE oce , ONLY: un, vn, rn2 ! ocean dynamics and tracers 17 USE phycst , ONLY: grav, vkarmn ! physical constant 18 USE eosbn2 , ONLY: eos_rab ! equation of state 19 USE zdfdrg , ONLY: rCd0_top, r_ke0_top ! vertical physics: top/bottom drag coef. 20 USE iom , ONLY: iom_put ! 21 USE lib_mpp , ONLY: ctl_stop 22 16 23 USE dom_oce ! ocean space and time domain 17 USE phycst ! physical constants18 USE eosbn2 ! equation of state19 USE zdfdrg ! vertical physics: top/bottom drag coef.20 USE iom21 24 USE in_out_manager ! I/O manager 22 25 ! … … 46 49 !!--------------------------------------------------------------------- 47 50 !!-------------------------- OUT ------------------------------------- 48 REAL(wp), DIMENSION(jpi,jpj), INTENT( inout) :: pgt , pgs ! gamma t and gamma s51 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt , pgs ! gamma t and gamma s 49 52 !!-------------------------- IN ------------------------------------- 50 53 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pqoce, pqfwf ! isf heat and fwf … … 114 117 !!--------------------------------------------------------------------- 115 118 !!-------------------------- OUT ------------------------------------- 116 REAL(wp), DIMENSION(jpi,jpj), INTENT( inout) :: pgt, pgs ! gammat and gammas [m/s]119 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt, pgs ! gammat and gammas [m/s] 117 120 !!-------------------------- IN ------------------------------------- 118 121 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: putbl, pvtbl ! velocity in the losch top boundary layer … … 145 148 !!--------------------------------------------------------------------- 146 149 !!-------------------------- OUT ------------------------------------- 147 REAL(wp), DIMENSION(jpi,jpj), INTENT( inout) :: pgt, pgs ! gammat and gammas150 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt, pgs ! gammat and gammas 148 151 !!-------------------------- IN ------------------------------------- 149 152 REAL(wp), INTENT(in ) :: pke2 ! background velocity squared -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90
r11844 r11852 11 11 !! isfcav_mlt : update surface ocean boundary condition under ice shelf 12 12 !!---------------------------------------------------------------------- 13 USE oce ! ocean dynamics and tracers 14 USE isf ! ice shelf public variables 15 USE isfutils ! ice shelf debug subroutine 16 USE dom_oce ! ocean space and time domain 17 USE phycst ! physical constants 18 USE eosbn2 ! equation of state 19 ! 20 USE in_out_manager ! I/O manager 21 USE iom ! I/O library 22 USE fldread ! read input field at current time step 23 USE lib_fortran 13 14 USE isf ! ice shelf 15 USE isftbl , ONLY: isf_tbl ! ice shelf depth average 16 USE isfutils,ONLY: debug ! debug subroutine 17 18 USE dom_oce ! ocean space and time domain 19 USE oce , ONLY: tsn ! ocean dynamics and tracers 20 USE phycst , ONLY: rcp, rau0, rau0_rcp ! physical constants 21 USE eosbn2 , ONLY: eos_fzp ! equation of state 22 23 USE in_out_manager ! I/O manager 24 USE iom , ONLY: iom_put ! I/O library 25 USE fldread , ONLY: fld_read ! 26 USE lib_fortran, ONLY: glob_sum ! 27 USE lib_mpp , ONLY: ctl_stop ! 24 28 25 29 IMPLICIT NONE … … 110 114 ! 111 115 ! read input file 112 CALL fld_read ( kt, nn_fsbc, sf_isfcav_fwf )116 CALL fld_read ( kt, 1, sf_isfcav_fwf ) 113 117 ! 114 118 ! define fwf and qoce … … 276 280 ! 277 281 ! read input file 278 CALL fld_read ( kt, nn_fsbc, sf_isfcav_fwf )282 CALL fld_read ( kt, 1, sf_isfcav_fwf ) 279 283 ! 280 284 ! ice shelf 2d map -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90
r11823 r11852 12 12 !! isfrst : read/write iceshelf variables in/from restart 13 13 !!---------------------------------------------------------------------- 14 USE isf ! ice shelf variable 15 USE lib_mpp, ONLY: mpp_sum, mpp_max ! mpp routine 16 USE domvvl , ONLY: dom_vvl_zgr ! vertical scale factor interpolation 17 ! 14 18 USE oce ! ocean dynamics and tracers 15 USE isf ! ice shelf variable16 USE isfutils ! debuging17 USE lib_mpp ! mpp routine18 USE domvvl ! vertical scale factor interpolation19 !20 19 USE in_out_manager ! I/O manager 21 20 USE iom ! I/O library … … 47 46 CONTAINS 48 47 SUBROUTINE isfcpl_init() 48 ! 49 ! start on an euler time step 50 neuler = 0 49 51 ! 50 52 CALL isf_alloc_cpl() … … 57 59 ! 58 60 ! correction of the horizontal divergence and associated temp. and salt content flux 61 ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 62 ! - decide how to manage thickness level change in conservation 59 63 CALL isfcpl_vol() 60 64 ! … … 66 70 vn(:,:,:) = vn(:,:,:) * vmask(:,:,:) 67 71 ! 68 ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 69 ! - decide how to manage thickness level change in conservation 72 ! all before fields set to now values 73 tsb (:,:,:,:) = tsn (:,:,:,:) 74 ub (:,:,:) = un (:,:,:) 75 vb (:,:,:) = vn (:,:,:) 76 sshb (:,:) = sshn (:,:) 77 e3t_b(:,:,:) = e3t_n(:,:,:) 78 79 ! prepare writing restart 80 IF( lwxios ) THEN 81 CALL iom_set_rstw_var_active('ssmask') 82 CALL iom_set_rstw_var_active('tmask') 83 CALL iom_set_rstw_var_active('e3t_n') 84 CALL iom_set_rstw_var_active('e3u_n') 85 CALL iom_set_rstw_var_active('e3v_n') 86 END IF 70 87 ! 71 88 END SUBROUTINE isfcpl_init … … 92 109 END SUBROUTINE isfcpl_rst_write 93 110 94 SUBROUTINE isfcpl_ssh 111 SUBROUTINE isfcpl_ssh() 95 112 !!---------------------------------------------------------------------- 96 113 !! *** ROUTINE iscpl_ssh *** … … 153 170 ! 154 171 ! recompute the vertical scale factor, depth and water thickness 155 CALL dom_vvl_zgr 172 CALL dom_vvl_zgr() 156 173 ! 157 174 END SUBROUTINE isfcpl_ssh 158 175 159 SUBROUTINE isfcpl_tra 176 SUBROUTINE isfcpl_tra() 160 177 !!---------------------------------------------------------------------- 161 178 !! *** ROUTINE iscpl_tra *** … … 316 333 END SUBROUTINE isfcpl_tra 317 334 318 SUBROUTINE isfcpl_vol 335 SUBROUTINE isfcpl_vol() 319 336 !!---------------------------------------------------------------------- 320 337 !! *** ROUTINE iscpl_vol *** … … 402 419 END SUBROUTINE isfcpl_vol 403 420 404 SUBROUTINE isfcpl_cons 421 SUBROUTINE isfcpl_cons() 405 422 !!---------------------------------------------------------------------- 406 423 !! *** ROUTINE iscpl_cons *** -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90
r11541 r11852 1 1 MODULE isfhdiv 2 2 3 USE dom_oce 4 USE iom 5 USE isf 6 USE isfutils 7 USE phycst 8 USE in_out_manager 3 USE isf ! ice shelf 4 USE dom_oce ! time and space domain 5 USE phycst , ONLY: r1_rau0 ! physical constant 6 USE in_out_manager ! 9 7 10 8 IMPLICIT NONE … … 39 37 ! 40 38 ! ice sheet coupling contribution 41 IF ( ln_isfcpl ) THEN39 IF ( ln_isfcpl .AND. kt /= 0 ) THEN 42 40 ! 43 41 ! correct divergence only for the first time step -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfload.F90
r11823 r11852 11 11 !!---------------------------------------------------------------------- 12 12 13 USE isf ! ice shelf variables 14 USE dom_oce ! vertical scale factor 13 USE isf, ONLY: cn_isfload ! ice shelf variables 14 15 USE dom_oce, ONLY: e3w_n, gdept_n, risfdep, mikt ! vertical scale factor 16 USE eosbn2 , ONLY: eos ! eos routine 17 18 USE lib_mpp, ONLY: ctl_stop ! ctl_stop routine 15 19 USE in_out_manager ! 16 USE eosbn2 ! eos routine17 USE lib_mpp ! ctl_stop routine18 20 19 21 IMPLICIT NONE … … 86 88 ! 87 89 ! !- Surface value + ice shelf gradient 88 risfload(:,:) = 0._wp ! compute pressure due to ice shelf load90 pisfload(:,:) = 0._wp ! compute pressure due to ice shelf load 89 91 DO jj = 1, jpj ! (used to compute hpgi/j for all the level from 1 to miku/v) 90 92 DO ji = 1, jpi ! divided by 2 later … … 94 96 ! 95 97 ! top layer of the ice shelf 96 risfload(ji,jj) = risfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w_n(ji,jj,1)98 pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w_n(ji,jj,1) 97 99 ! 98 100 ! core layers of the ice shelf 99 101 DO jk = 2, ikt-1 100 risfload(ji,jj) = risfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w_n(ji,jj,jk)102 pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w_n(ji,jj,jk) 101 103 END DO 102 104 ! 103 105 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 104 risfload(ji,jj) = risfload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) &106 pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) & 105 107 & * ( risfdep(ji,jj) - gdept_n(ji,jj,ikt-1) ) 106 108 ! -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfnxt.F90
r11541 r11852 8 8 9 9 !!------------------------------------------------------------------------- 10 !! isfnxt : aplly correction need for the ice shelf10 !! isfnxt : aplly correction needed for the ice shelf to ensure conservation 11 11 !!------------------------------------------------------------------------- 12 12 13 13 USE isf 14 USE phycst 15 USE dom_oce 14 15 USE phycst , ONLY: r1_rau0 ! physical constant 16 USE dom_oce, ONLY: e3t_b, e3t_n, r1_e1e2t ! time and space domain 17 16 18 USE in_out_manager 17 19 … … 20 22 PRIVATE 21 23 22 PUBLIC isf_dynnxt ! isf_tranxt24 PUBLIC isf_dynnxt 23 25 24 26 CONTAINS … … 34 36 INTEGER , INTENT(in ) :: kt 35 37 ! 36 REAL(wp), INTENT(in ) :: pcoef ! atfp * rdt 38 REAL(wp), INTENT(in ) :: pcoef ! atfp * rdt * r1_rau0 37 39 !!-------------------------- IN ------------------------------------- 38 40 !!-------------------------------------------------------------------- -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfpar.F90
r11541 r11852 14 14 !! isfpar : compute ice shelf melt using a prametrisation of ice shelf cavities 15 15 !!---------------------------------------------------------------------- 16 USE oce ! ocean dynamics and tracers16 !USE oce ! ocean dynamics and tracers 17 17 USE isf ! ice shelf 18 USE isfutils ! 19 USE isfparmlt ! ice shelf parametrisation 20 USE isftbl ! ice shelf depth average 21 USE isfdiags ! ice shelf diagnostics 22 USE dom_oce ! ocean space and time domain 23 USE phycst ! physical constants 24 USE eosbn2 ! equation of state 18 ! 19 USE isfrst , ONLY: isfrst_write, isfrst_read ! ice shelf restart read/write subroutine 20 USE isftbl , ONLY: isf_tbl_ktop, isf_tbl_lvl ! ice shelf top boundary layer properties subroutine 21 USE isfutils , ONLY: debug, read_2dcstdta ! ice shelf debug subroutine 22 USE isfparmlt, ONLY: isfpar_mlt ! ice shelf melt formulation subroutine 23 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine 24 ! 25 USE dom_oce , ONLY: jpi,jpj ! ocean space and time domain 26 USE phycst , ONLY: r1_rau0_rcp ! physical constants 25 27 ! 26 28 USE in_out_manager ! I/O manager 27 29 USE iom ! I/O library 28 30 USE fldread ! read input field at current time step 29 USE lbclnk ! 31 USE lbclnk ! lbc_lnk 30 32 31 33 IMPLICIT NONE … … 80 82 ptsc(:,:,jp_tem) = zqh(:,:) * r1_rau0_rcp 81 83 ! 84 ! write restart variables (qoceisf, qhcisf, fwfisf for now and before) 85 IF (lrst_oce) CALL isfrst_write(kt, 'par', ptsc, pqfwf) 86 ! 87 IF ( ln_isfdebug ) THEN 88 CALL debug('isf_par: ptsc T',ptsc(:,:,1)) 89 CALL debug('isf_par: ptsc S',ptsc(:,:,2)) 90 CALL debug('isf_par: pqfwf fwf',pqfwf(:,:)) 91 END IF 92 ! 82 93 END SUBROUTINE isf_par 83 94 … … 100 111 rhisf_tbl_par(:,:) = 1e-20 ; rfrac_tbl_par(:,:) = 0.0_wp 101 112 ! 102 mskisf_par(:,:) = 0103 !104 113 ! define isf tbl tickness, top and bottom indice 105 114 CALL read_2dcstdta(TRIM(sn_isfpar_zmax%clname), TRIM(sn_isfpar_zmax%clvar), ztblmax) … … 110 119 ztblmin(:,:) = ztblmin(:,:) * ssmask(:,:) 111 120 ! 112 ! if param used under an ice shelf overwrite ztblm axby the ice shelf draft121 ! if param used under an ice shelf overwrite ztblmin by the ice shelf draft 113 122 WHERE ( risfdep > 0._wp .AND. ztblmin > 0._wp ) 114 123 ztblmin(:,:) = risfdep(:,:) … … 127 136 END WHERE 128 137 ! 129 ! compute misfkb_par, rhisf_tbl 130 rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 131 CALL isf_tbl_lvl( ht_n * mskisf_par, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 138 ! read par variable from restart 139 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 132 140 ! 133 141 SELECT CASE ( TRIM(cn_isfpar_mlt) ) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfparmlt.F90
r11541 r11852 8 8 !!---------------------------------------------------------------------- 9 9 10 USE oce ! ocean dynamics and tracers11 10 USE isf ! ice shelf 12 USE isftbl ! ice shelf depth average 13 USE dom_oce ! ocean space and time domain 14 USE phycst ! physical constants 15 USE eosbn2 ! equation of state 16 17 USE in_out_manager ! I/O manager 18 USE iom ! I/O library 19 USE fldread ! 20 USE lib_fortran ! 11 USE isftbl , ONLY: isf_tbl ! ice shelf depth average 12 13 USE dom_oce ! ocean space and time domain 14 USE oce , ONLY: tsn ! ocean dynamics and tracers 15 USE phycst , ONLY: rcp, rau0 ! physical constants 16 USE eosbn2 , ONLY: eos_fzp ! equation of state 17 18 USE in_out_manager ! I/O manager 19 USE iom , ONLY: iom_put ! I/O library 20 USE fldread , ONLY: fld_read ! 21 USE lib_fortran, ONLY: glob_sum ! 22 USE lib_mpp , ONLY: ctl_stop ! 21 23 22 24 IMPLICIT NONE … … 91 93 ! 92 94 ! 0. ------------Read specified runoff 93 CALL fld_read ( kt, nn_fsbc, sf_isfpar_fwf )95 CALL fld_read ( kt, 1, sf_isfpar_fwf ) 94 96 ! 95 97 ! compute ptfrz … … 153 155 CALL iom_put('isfthermald_par',( ztfrz(:,:) - ztavg(:,:) ) * mskisf_par(:,:)) 154 156 ! 155 !156 157 END SUBROUTINE isfpar_mlt_bg03 157 158 … … 180 181 ! 181 182 ! 0. ------------Read specified runoff 182 CALL fld_read ( kt, nn_fsbc, sf_isfpar_fwf )183 CALL fld_read ( kt, 1, sf_isfpar_fwf ) 183 184 ! 184 185 ! 1. ------------Mean freezing point (needed for heat content flux) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfrst.F90
r11423 r11852 10 10 !! isfrst : read/write iceshelf variables in/from restart 11 11 !!---------------------------------------------------------------------- 12 USE oce ! ocean dynamics and tracers13 USE isf ! ice shelf variable12 ! 13 USE dom_oce, ONLY: jpi,jpj,jpk,jpts ! time and space domain 14 14 ! 15 15 USE in_out_manager ! I/O manager … … 61 61 ! 62 62 IF( lwxios ) THEN 63 64 65 63 CALL iom_set_rstw_var_active(TRIM(chc_b )) 64 CALL iom_set_rstw_var_active(TRIM(csc_b )) 65 CALL iom_set_rstw_var_active(TRIM(cfwf_b)) 66 66 ENDIF 67 68 CALL FLUSH(numout) 67 69 68 70 END SUBROUTINE isfrst_read … … 74 76 !!-------------------------- OUT -------------------------------------- 75 77 !!-------------------------- IN -------------------------------------- 76 INTEGER , INTENT(in ) :: kt77 CHARACTER(LEN=256) , INTENT(in ) :: cdisf78 INTEGER , INTENT(in ) :: kt 79 CHARACTER(LEN=256) , INTENT(in ) :: cdisf 78 80 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pfwf 79 81 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90
r11823 r11852 13 13 !! isfstp : compute iceshelf melt and heat flux 14 14 !!---------------------------------------------------------------------- 15 USE oce ! ocean dynamics and tracers16 USE dom_oce ! ocean space and time domain17 USE domvvl, ONLY : ln_vvl_zstar18 USE phycst ! physical constants19 USE eosbn2 ! equation of state20 USE sbc_oce ! surface boundary condition: ocean fields21 USE zdfdrg ! vertical physics: top/bottom drag coef.22 15 ! 16 USE isf ! isf variables 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 22 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 23 28 USE in_out_manager ! I/O manager 24 USE iom ! I/O library25 USE fldread ! read input field at current time step26 USE lbclnk !27 USE lib_fortran ! glob_sum28 !29 USE isfrst ! iceshelf restart30 USE isftbl ! ice shelf boundary layer31 USE isfpar ! ice shelf parametrisation32 USE isfcav ! ice shelf cavity33 USE isfload ! ice shelf load34 USE isfcpl ! isf variables35 USE isf ! isf variables36 USE isfutils37 29 38 30 IMPLICIT NONE … … 82 74 CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav) 83 75 ! 84 ! write restart variables (risf_cav_tsc, fwfisf for now and before)85 IF (lrst_oce) CALL isfrst_write(kt, 'cav', risf_cav_tsc, fwfisf_cav)86 !87 76 END IF 88 77 ! … … 102 91 CALL isf_par( kt, risf_par_tsc, fwfisf_par) 103 92 ! 104 ! write restart variables (qoceisf, qhcisf, fwfisf for now and before) 105 IF (lrst_oce) CALL isfrst_write(kt, 'par', risf_par_tsc, fwfisf_par) 106 ! 107 END IF 108 109 IF ( ln_isfcpl ) THEN 110 ! 111 IF (lrst_oce) CALL isfcpl_rst_write(kt) 112 ! 113 END IF 93 END IF 94 ! 95 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) 114 96 ! 115 97 END SUBROUTINE isf_stp … … 148 130 ! 149 131 !--------------------------------------------------------------------------------------------------------------------- 150 ! initialisation ice sheet coupling151 IF( ln_isfcpl ) THEN152 !153 ! start on an euler time step154 neuler = 0155 !156 ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction157 CALL isfcpl_init()158 !159 ! all before fields set to now values160 tsb (:,:,:,:) = tsn (:,:,:,:)161 ub (:,:,:) = un (:,:,:)162 vb (:,:,:) = vn (:,:,:)163 sshb (:,:) = sshn (:,:)164 e3t_b(:,:,:) = e3t_n(:,:,:)165 166 ! prepare writing restart167 IF( lwxios ) CALL iom_set_rstw_var_active('ssmask')168 IF( lwxios ) CALL iom_set_rstw_var_active('tmask')169 IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n')170 IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n')171 IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n')172 !173 END IF174 !175 !---------------------------------------------------------------------------------------------------------------------176 132 ! initialisation melt in the cavity 177 IF ( ln_isfcav_mlt ) THEN 178 ! 179 ! initialisation of cav variable 180 CALL isf_cav_init() 181 ! 182 ! read cav variable from restart 183 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 184 ! 185 END IF 133 IF ( ln_isfcav_mlt ) CALL isf_cav_init() 186 134 ! 187 135 !--------------------------------------------------------------------------------------------------------------------- 188 136 ! initialisation parametrised melt 189 IF ( ln_isfpar_mlt ) THEN 190 ! 191 ! initialisation of par variable 192 CALL isf_par_init() 193 ! 194 ! read par variable from restart 195 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 196 ! 197 END IF 137 IF ( ln_isfpar_mlt ) CALL isf_par_init() 138 ! 139 !--------------------------------------------------------------------------------------------------------------------- 140 ! initialisation ice sheet coupling 141 IF( ln_isfcpl ) CALL isfcpl_init() 198 142 ! 199 143 END IF … … 224 168 WRITE(numout,*) ' gamma formulation cn_gammablk = ', TRIM(cn_gammablk) 225 169 IF ( TRIM(cn_gammablk) .NE. 'spe' ) THEN 226 WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0 227 WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0 228 WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top 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 229 174 END IF 230 175 END IF -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90
r11844 r11852 14 14 !!---------------------------------------------------------------------- 15 15 16 USE isf ! ice shelf variables 17 16 18 USE dom_oce ! vertical scale factor 17 USE lbclnk ! lbc_lnk subroutine18 USE isfutils19 USE isf20 19 21 20 IMPLICIT NONE … … 69 68 CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, zvarout ) 70 69 ! 71 ! check if needed (probably yes)72 CALL lbc_lnk('sbcisf', pvarout,'U',-1.)73 !74 70 ! compute tbl property at T point 75 71 pvarout(1,:) = 0._wp … … 92 88 CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, zvarout ) 93 89 ! 94 ! check if needed (probably yes)95 CALL lbc_lnk('sbcisf', pvarout,'V',-1.)96 !97 90 ! pvarout is an averaging of wet point 98 91 pvarout(:,1) = 0._wp … … 110 103 ! 111 104 END SELECT 112 !113 IF (ln_isfdebug) CALL debug('isf_tbl pvarout:',pvarout)114 105 ! 115 106 END SUBROUTINE isf_tbl -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90
r11844 r11852 12 12 !!---------------------------------------------------------------------- 13 13 14 USE iom 15 USE lib_fortran 16 USE lib_mpp 14 USE iom , ONLY: iom_open, iom_get, iom_close, jpdom_data ! read input file 15 USE lib_fortran , ONLY: glob_sum, glob_min, glob_max ! compute global value 16 USE dom_oce , ONLY: jpi,jpj,jpk ! domain size 17 USE in_out_manager, ONLY: wp, lwp, numout ! miscelenious 17 18 18 19 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.