- Timestamp:
- 2017-09-01T15:49:35+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icewri.F90
r8424 r8486 8 8 !! 'key_lim3' LIM3 sea-ice model 9 9 !!---------------------------------------------------------------------- 10 !! ice_wri : write of the diagnostics variables in ouput file10 !! ice_wri : write of the diagnostics variables in ouput file 11 11 !! ice_wri_state : write for initial state or/and abandon 12 12 !!---------------------------------------------------------------------- 13 USE ioipsl 14 USE dianam ! build name of file (routine) 15 USE phycst 16 USE dom_oce 17 USE sbc_oce 18 USE sbc_ice ! Surface boundary condition: ice fields 19 USE ice 20 USE icevar 13 USE dianam ! build name of file (routine) 14 USE phycst ! physical constant 15 USE dom_oce ! domain: ocean 16 USE sbc_oce ! surf. boundary cond.: ocean 17 USE sbc_ice ! Surface boundary condition: ice fields 18 USE ice ! sea-ice: variables 19 USE icevar ! sea-ice: operations 21 20 ! 22 USE in_out_manager 23 USE lbclnk 24 USE lib_mpp ! MPP library 25 USE iom 26 USE timing ! Timing 27 USE lib_fortran ! Fortran utilities 21 USE ioipsl ! 22 USE in_out_manager ! 23 USE lbclnk ! 24 USE lib_mpp ! MPP library 25 USE iom ! 26 USE timing ! Timing 27 USE lib_fortran ! Fortran utilities 28 28 29 29 IMPLICIT NONE 30 30 PRIVATE 31 31 32 PUBLIC ice_wri ! routine called by lim_step.F9032 PUBLIC ice_wri ! called by ice_stp 33 33 PUBLIC ice_wri_state ! called by dia_wri_state 34 34 35 35 !!---------------------------------------------------------------------- 36 !! NEMO/ LIM3 4.0 , UCL - NEMO Consortium (2011)36 !! NEMO/ICE 4.0 , NEMO Consortium (2017) 37 37 !! $Id: icewri.F90 8409 2017-08-07 15:29:21Z clem $ 38 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 55 55 REAL(wp) :: z2da, z2db, ztmp, zrho1, zrho2, zmiss_val 56 56 REAL(wp) :: zs12, zshear 57 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zswi, zmiss ! 2D workspace 58 REAL(wp), DIMENSION(jpi,jpj) :: zfb ! ice freeboard 59 REAL(wp), DIMENSION(jpi,jpj) :: zamask, zamask15 ! 15% concentration mask 60 REAL(wp), DIMENSION(jpi,jpj) :: zsig1, zsig2, zsig3 57 61 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zswi2, zmiss2 58 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zswi, zmiss ! 2D workspace 59 REAL(wp), DIMENSION(jpi,jpj) :: zfb ! ice freeboard 60 REAL(wp), DIMENSION(jpi,jpj) :: zamask, zamask15 ! 15% concentration mask 61 REAL(wp), DIMENSION(jpi,jpj) :: zsig1, zsig2, zsig3 62 62 ! 63 63 ! Global ice diagnostics (SIMIP) 64 REAL(wp) :: zdiag_area_nh, & ! area, extent, volume 65 & zdiag_extt_nh, & 66 & zdiag_area_sh, & 67 & zdiag_extt_sh, & 68 & zdiag_volu_nh, & 69 & zdiag_volu_sh 70 64 REAL(wp) :: zdiag_area_nh, zdiag_extt_nh, zdiag_volu_nh ! area, extent, volume 65 REAL(wp) :: zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh 71 66 !!------------------------------------------------------------------- 72 67 73 IF( nn_timing == 1 ) CALL timing_start('icewri')68 IF( nn_timing == 1 ) CALL timing_start('icewri') 74 69 75 70 !---------------------------------------- … … 77 72 !---------------------------------------- 78 73 79 ! brine volume 80 CALL ice_var_bv 74 CALL ice_var_bv ! brine volume 81 75 82 76 ! tresholds for outputs … … 96 90 END DO 97 91 98 zmiss_val = 1. 0e2099 zmiss (:,:) = zmiss_val * ( 1. - zswi(:,:) )100 zmiss2(:,:,:) = zmiss_val * ( 1. - zswi2(:,:,:) )92 zmiss_val = 1.e20_wp 93 zmiss (:,:) = zmiss_val * ( 1._wp - zswi (:,:) ) 94 zmiss2(:,:,:) = zmiss_val * ( 1._wp - zswi2(:,:,:) ) 101 95 102 96 !---------------------------------------- … … 112 106 IF( iom_use('qt_ice' ) ) CALL iom_put( "qt_ice" , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) ) & 113 107 & * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) 108 !!gm I don't understand the variable below.... why not multiplied by a_i_b or (1-a_i_b) ??? 114 109 IF( iom_use('qemp_oce') ) CALL iom_put( "qemp_oce" , qemp_oce(:,:) ) 115 110 IF( iom_use('qemp_ice') ) CALL iom_put( "qemp_ice" , qemp_ice(:,:) ) 116 IF( iom_use('emp_oce' ) ) CALL iom_put( "emp_oce" , emp_oce (:,:) ) ! emp over ocean (taking into account the snow blown away from the ice)117 IF( iom_use('emp_ice' ) ) CALL iom_put( "emp_ice" , emp_ice (:,:) ) ! emp over ice (taking into account the snow blown away from the ice)111 IF( iom_use('emp_oce' ) ) CALL iom_put( "emp_oce" , emp_oce (:,:) ) ! emp over ocean (taking into account the snow blown away from the ice) 112 IF( iom_use('emp_ice' ) ) CALL iom_put( "emp_ice" , emp_ice (:,:) ) ! emp over ice (taking into account the snow blown away from the ice) 118 113 119 114 ! velocity 120 IF ( iom_use('uice_ipa') ) CALL iom_put( "uice_ipa" , u_ice )! ice velocity u component121 IF ( iom_use('vice_ipa') ) CALL iom_put( "vice_ipa" , v_ice )! ice velocity v component122 123 IF ( ( iom_use( "icevel" ) ) .OR. ( iom_use( "icevel_mv" )) ) THEN115 IF( iom_use('uice_ipa') ) CALL iom_put( "uice_ipa" , u_ice ) ! ice velocity u component 116 IF( iom_use('vice_ipa') ) CALL iom_put( "vice_ipa" , v_ice ) ! ice velocity v component 117 118 IF( iom_use('icevel') .OR. iom_use('icevel_mv') ) THEN 124 119 DO jj = 2 , jpjm1 125 120 DO ji = 2 , jpim1 126 z2da = ( u_ice(ji,jj) * umask(ji,jj,1) + u_ice(ji-1,jj) * umask(ji-1,jj,1) ) * 0.5_wp127 z2db = ( v_ice(ji,jj) * vmask(ji,jj,1) + v_ice(ji,jj-1) * vmask(ji,jj-1,1) ) * 0.5_wp128 z2d(ji,jj) = SQRT( z2da * z2da + z2db * z2db )121 z2da = ( u_ice(ji,jj) + u_ice(ji-1,jj) ) 122 z2db = ( v_ice(ji,jj) + v_ice(ji,jj-1) ) 123 z2d(ji,jj) = O.5_wp * SQRT( z2da * z2da + z2db * z2db ) 129 124 END DO 130 125 END DO 131 126 CALL lbc_lnk( z2d, 'T', 1. ) 132 IF ( iom_use( "icevel" ) ) CALL iom_put( "icevel" , z2d )! ice velocity module133 IF ( iom_use( "icevel_mv" ) ) CALL iom_put( "icevel_mv" , z2d(:,:) * zswi(:,:) + zmiss(:,:) )! ice velocity module (missing value)134 ENDIF 135 136 IF ( iom_use( "tau_icebfr" ) )CALL iom_put( "tau_icebfr" , tau_icebfr ) ! ice friction with ocean bottom (landfast ice)137 ! 138 IF ( iom_use( "miceage" )) CALL iom_put( "miceage" , om_i * zswi * zamask15 ) ! mean ice age139 IF ( iom_use( "micet" ) )CALL iom_put( "micet" , ( tm_i - rt0 ) * zswi ) ! ice mean temperature140 IF ( iom_use( "icest" ) )CALL iom_put( "icest" , ( tm_su - rt0 ) * zswi ) ! ice surface temperature141 IF ( iom_use( "icecolf" )) CALL iom_put( "icecolf" , hicol ) ! frazil ice collection thickness127 IF( iom_use('icevel' ) ) CALL iom_put( "icevel" , z2d ) ! ice velocity module 128 IF( iom_use('icevel_mv') ) CALL iom_put( "icevel_mv" , z2d(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity module (missing value) 129 ENDIF 130 131 IF( iom_use('tau_icebfr') ) CALL iom_put( "tau_icebfr" , tau_icebfr ) ! ice friction with ocean bottom (landfast ice) 132 ! 133 IF( iom_use('miceage') ) CALL iom_put( "miceage" , om_i * zswi * zamask15 ) ! mean ice age 134 IF( iom_use('micet') ) CALL iom_put( "micet" , ( tm_i - rt0 ) * zswi ) ! ice mean temperature 135 IF( iom_use('icest') ) CALL iom_put( "icest" , ( tm_su - rt0 ) * zswi ) ! ice surface temperature 136 IF( iom_use('icecolf') ) CALL iom_put( "icecolf" , hicol ) ! frazil ice collection thickness 142 137 ! 143 138 CALL iom_put( "isst" , sst_m ) ! sea surface temperature … … 149 144 CALL iom_put( "isnowhc" , et_s * zswi ) ! snow total heat content 150 145 CALL iom_put( "ibrinv" , bvm_i * zswi * 100. ) ! brine volume 151 CALL iom_put( "snowpre" , sprecip * 86400. ) ! snow precipitation 146 CALL iom_put( "snowpre" , sprecip * 86400. ) ! snow precipitation [m/day] 152 147 CALL iom_put( "micesalt" , smt_i * zswi ) ! mean ice salinity 153 148 CALL iom_put( "snowvol" , vt_s * zswi ) ! snow volume … … 224 219 CALL iom_put ('hfxspr' , hfx_spr(:,:) ) ! Heat content of snow precip 225 220 221 !!gm ====>>>>> THIS should be moved in icerhg_evp (generalize this everywhere it is possible and logic...) 226 222 ! specific outputs for EVP rheology 227 IF( iom_use( "isig1" ) .OR. iom_use( "isig2" ) .OR. iom_use( "isig3") ) THEN223 IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') ) THEN 228 224 zsig1(:,:) = 0._wp; zsig2(:,:) = 0._wp; zsig3(:,:) = 0._wp; 229 225 DO jj = 2, jpjm1 … … 251 247 CALL iom_put( "isig3" , zsig3 ) 252 248 ENDIF 253 249 !!gm <<<<<<======= end 250 251 !!gm ====>>>>> THIS should be moved where at_ip, vt_ip are computed fro the last time in the time-step (limmpd) 254 252 ! MV MP 2016 255 253 IF ( ln_pnd ) THEN … … 258 256 ENDIF 259 257 ! END MV MP 2016 258 !!gm <<<<<<======= end 260 259 261 260 !---------------------------------- 262 261 ! Output category-dependent fields 263 262 !---------------------------------- 264 IF ( iom_use( "iceconc_cat" ) ) CALL iom_put( "iceconc_cat" , a_i * zswi2 ) ! area for categories 265 IF ( iom_use( "icethic_cat" ) ) CALL iom_put( "icethic_cat" , ht_i * zswi2 ) ! thickness for categories 266 IF ( iom_use( "snowthic_cat" ) ) CALL iom_put( "snowthic_cat" , ht_s * zswi2 ) ! snow depth for categories 267 IF ( iom_use( "salinity_cat" ) ) CALL iom_put( "salinity_cat" , sm_i * zswi2 ) ! salinity for categories 268 ! ice temperature 269 IF ( iom_use( "icetemp_cat" ) ) CALL iom_put( "icetemp_cat", ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zswi2 ) 270 ! snow temperature 271 IF ( iom_use( "snwtemp_cat" ) ) CALL iom_put( "snwtemp_cat", ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zswi2 ) 272 ! ice age 273 IF ( iom_use( "iceage_cat" ) ) CALL iom_put( "iceage_cat" , o_i * zswi2 ) 274 ! brine volume 275 IF ( iom_use( "brinevol_cat" ) ) CALL iom_put( "brinevol_cat", bv_i * 100. * zswi2 ) 263 IF ( iom_use('iceconc_cat' ) ) CALL iom_put( "iceconc_cat" , a_i * zswi2 ) ! area for categories 264 IF ( iom_use('icethic_cat' ) ) CALL iom_put( "icethic_cat" , ht_i * zswi2 ) ! thickness for categories 265 IF ( iom_use('snowthic_cat') ) CALL iom_put( "snowthic_cat" , ht_s * zswi2 ) ! snow depth for categories 266 IF ( iom_use('salinity_cat') ) CALL iom_put( "salinity_cat" , sm_i * zswi2 ) ! salinity for categories 267 IF ( iom_use('icetemp_cat' ) ) CALL iom_put( "icetemp_cat", ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zswi2 ) ! ice temperature 268 IF ( iom_use('snwtemp_cat' ) ) CALL iom_put( "snwtemp_cat", ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zswi2 ) ! snow temperature 269 IF ( iom_use('iceage_cat' ) ) CALL iom_put( "iceage_cat" , o_i * zswi2 ) ! ice age 270 IF ( iom_use('brinevol_cat') ) CALL iom_put( "brinevol_cat", bv_i * 100. * zswi2 ) ! brine volume 276 271 277 272 ! MV MP 2016 278 273 IF ( ln_pnd ) THEN 279 IF ( iom_use( "iceamp_cat") ) CALL iom_put( "iceamp_cat" , a_ip * zswi2 ) ! melt pond frac for categories280 IF ( iom_use( "icevmp_cat") ) CALL iom_put( "icevmp_cat" , v_ip * zswi2 ) ! melt pond frac for categories281 IF ( iom_use( "icehmp_cat") ) CALL iom_put( "icehmp_cat" , h_ip * zswi2 ) ! melt pond frac for categories282 IF ( iom_use( "iceafp_cat") ) CALL iom_put( "iceafp_cat" , a_ip_frac * zswi2 ) ! melt pond frac for categories274 IF ( iom_use('iceamp_cat') ) CALL iom_put( "iceamp_cat" , a_ip * zswi2 ) ! melt pond frac for categories 275 IF ( iom_use('icevmp_cat') ) CALL iom_put( "icevmp_cat" , v_ip * zswi2 ) ! melt pond frac for categories 276 IF ( iom_use('icehmp_cat') ) CALL iom_put( "icehmp_cat" , h_ip * zswi2 ) ! melt pond frac for categories 277 IF ( iom_use('iceafp_cat') ) CALL iom_put( "iceafp_cat" , a_ip_frac * zswi2 ) ! melt pond frac for categories 283 278 ENDIF 284 279 ! END MV MP 2016 … … 289 284 zrho1 = ( rau0 - rhoic ) / rau0; zrho2 = rhosn / rau0 290 285 291 IF 292 IF 293 IF 294 IF 295 IF 296 297 IF 298 IF 299 IF 300 301 IF 302 IF 303 IF 304 IF 305 IF 306 IF 307 308 IF 286 IF ( iom_use( "icepres" ) ) CALL iom_put( "icepres" , zswi(:,:) ) ! Ice presence (1 or 0) 287 IF ( iom_use( "icemass" ) ) CALL iom_put( "icemass" , rhoic * vt_i(:,:) * zswi(:,:) ) ! Ice mass per cell area 288 IF ( iom_use( "icethic" ) ) CALL iom_put( "icethic" , htm_i(:,:) * zamask(:,:) + ( 1. - zamask(:,:) ) * zmiss_val ) ! Ice thickness 289 IF ( iom_use( "snomass" ) ) CALL iom_put( "snomass" , rhosn * vt_s(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow mass per cell area 290 IF ( iom_use( "snothic" ) ) CALL iom_put( "snothic" , htm_s(:,:) * zamask(:,:) + ( 1. - zamask(:,:) ) * zmiss_val ) ! Snow thickness 291 292 IF ( iom_use( "iceconc_cat_mv" ) ) CALL iom_put( "iceconc_cat_mv" , a_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Area for categories 293 IF ( iom_use( "icethic_cat_mv" ) ) CALL iom_put( "icethic_cat_mv" , ht_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Thickness for categories 294 IF ( iom_use( "snowthic_cat_mv" ) ) CALL iom_put( "snowthic_cat_mv", ht_s(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Snow depth for categories 295 296 IF ( iom_use( "icestK" ) ) CALL iom_put( "icestK" , tm_su(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice surface temperature 297 IF ( iom_use( "icesntK" ) ) CALL iom_put( "icesntK" , tm_si(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow-ice interface temperature 298 IF ( iom_use( "icebotK" ) ) CALL iom_put( "icebotK" , t_bo(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice bottom temperature 299 IF ( iom_use( "iceage" ) ) CALL iom_put( "iceage" , om_i(:,:) * zamask15(:,:) + ( 1. - zamask15(:,:) ) * zmiss_val ) ! Ice age 300 IF ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass" , SUM( smv_i, DIM = 3 ) * rhoic * 1.0e-3 * zswi(:,:) ) ! Mass of salt in sea ice per cell area 301 IF ( iom_use( "icesal" ) ) CALL iom_put( "icesal" , smt_i(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice salinity 302 303 IF ( iom_use( "icefb" ) ) THEN 309 304 zfb(:,:) = ( zrho1 * htm_i(:,:) - zrho2 * htm_s(:,:) ) 310 305 WHERE( zfb < 0._wp ) ; zfb = 0._wp ; END WHERE 311 312 ENDIF 313 314 IF 315 316 IF 317 & - wfx_sni - wfx_opw - wfx_res )318 IF 319 IF 320 IF 321 IF 322 IF 323 IF 324 325 IF 326 IF 327 IF 328 329 IF 330 IF 331 332 IF 333 IF 334 335 IF 336 IF 337 IF 338 339 IF 340 IF 341 IF 342 343 IF 344 IF 306 CALL iom_put( "icefb" , zfb(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice freeboard 307 ENDIF 308 309 IF ( iom_use( "isnhcneg" ) ) CALL iom_put( "isnhcneg" , - et_s(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow total heat content 310 311 IF ( iom_use( "dmithd" ) ) CALL iom_put( "dmithd" , - wfx_bog - wfx_bom - wfx_sum & ! Sea-ice mass change from thermodynamics 312 & - wfx_sni - wfx_opw - wfx_res ) 313 IF ( iom_use( "dmidyn" ) ) CALL iom_put( "dmidyn" , diag_dmi_dyn ) ! Sea-ice mass change from dynamics 314 IF ( iom_use( "dmiopw" ) ) CALL iom_put( "dmiopw" , - wfx_opw ) ! Sea-ice mass change through growth in open water 315 IF ( iom_use( "dmibog" ) ) CALL iom_put( "dmibog" , - wfx_bog ) ! Sea-ice mass change through basal growth 316 IF ( iom_use( "dmisni" ) ) CALL iom_put( "dmisni" , - wfx_sni ) ! Sea-ice mass change through snow-to-ice conversion 317 IF ( iom_use( "dmisum" ) ) CALL iom_put( "dmisum" , - wfx_sum ) ! Sea-ice mass change through surface melting 318 IF ( iom_use( "dmibom" ) ) CALL iom_put( "dmibom" , - wfx_bom ) ! Sea-ice mass change through bottom melting 319 320 IF ( iom_use( "dmtsub" ) ) CALL iom_put( "dmtsub" , - wfx_sub ) ! Sea-ice mass change through evaporation and sublimation 321 IF ( iom_use( "dmssub" ) ) CALL iom_put( "dmssub" , - wfx_snw_sub ) ! Snow mass change through sublimation 322 IF ( iom_use( "dmisub" ) ) CALL iom_put( "dmisub" , - wfx_ice_sub ) ! Sea-ice mass change through sublimation 323 324 IF ( iom_use( "dmsspr" ) ) CALL iom_put( "dmsspr" , - wfx_spr ) ! Snow mass change through snow fall 325 IF ( iom_use( "dmsssi" ) ) CALL iom_put( "dmsssi" , wfx_sni*rhosn/rhoic ) ! Snow mass change through snow-to-ice conversion 326 327 IF ( iom_use( "dmsmel" ) ) CALL iom_put( "dmsmel" , - wfx_snw_sum ) ! Snow mass change through melt 328 IF ( iom_use( "dmsdyn" ) ) CALL iom_put( "dmsdyn" , diag_dms_dyn ) ! Snow mass change through dynamics 329 330 IF ( iom_use( "hfxsenso" ) ) CALL iom_put( "hfxsenso" , -fhtur(:,:) * zswi(:,:) + zmiss(:,:) ) ! Sensible oceanic heat flux 331 IF ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo" , diag_fc_bo * zswi(:,:) + zmiss(:,:) ) ! Bottom conduction flux 332 IF ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu" , diag_fc_su * zswi(:,:) + zmiss(:,:) ) ! Surface conduction flux 333 334 IF ( iom_use( "wfxtot" ) ) CALL iom_put( "wfxtot" , wfx_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Total freshwater flux from sea ice 335 IF ( iom_use( "wfxsum" ) ) CALL iom_put( "wfxsum" , wfx_sum(:,:) * zswi(:,:) + zmiss(:,:) ) ! Freshwater flux from sea-ice surface 336 IF ( iom_use( "sfx_mv" ) ) CALL iom_put( "sfx_mv" , sfx(:,:) * 0.001 * zswi(:,:) + zmiss(:,:) ) ! Total salt flux 337 338 IF ( iom_use( "uice_mv" ) ) CALL iom_put( "uice_mv" , u_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity u component 339 IF ( iom_use( "vice_mv" ) ) CALL iom_put( "vice_mv" , v_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity v component 345 340 346 IF 347 IF 348 349 IF 350 IF 351 352 IF 353 IF 354 355 IF 356 IF 357 358 IF 359 IF 360 361 IF 362 363 IF 364 IF 365 366 IF 367 IF 368 369 IF 370 IF 371 372 IF 373 IF 341 IF ( iom_use( "xmtrpice" ) ) CALL iom_put( "xmtrpice" , diag_xmtrp_ice(:,:) ) ! X-component of sea-ice mass transport (kg/s) 342 IF ( iom_use( "ymtrpice" ) ) CALL iom_put( "ymtrpice" , diag_ymtrp_ice(:,:) ) ! Y-component of sea-ice mass transport 343 344 IF ( iom_use( "xmtrpsnw" ) ) CALL iom_put( "xmtrpsnw" , diag_xmtrp_snw(:,:) ) ! X-component of snow mass transport (kg/s) 345 IF ( iom_use( "ymtrpsnw" ) ) CALL iom_put( "ymtrpsnw" , diag_ymtrp_snw(:,:) ) ! Y-component of snow mass transport 346 347 IF ( iom_use( "xatrp" ) ) CALL iom_put( "xatrp" , diag_xatrp(:,:) ) ! X-component of ice area transport 348 IF ( iom_use( "yatrp" ) ) CALL iom_put( "yatrp" , diag_yatrp(:,:) ) ! Y-component of ice area transport 349 350 IF ( iom_use( "utau_ice" ) ) CALL iom_put( "utau_ice" , utau_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Wind stress term in force balance (x) 351 IF ( iom_use( "vtau_ice" ) ) CALL iom_put( "vtau_ice" , vtau_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Wind stress term in force balance (y) 352 353 IF ( iom_use( "utau_oi" ) ) CALL iom_put( "utau_oi" , diag_utau_oi(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ocean stress term in force balance (x) 354 IF ( iom_use( "vtau_oi" ) ) CALL iom_put( "vtau_oi" , diag_vtau_oi(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ocean stress term in force balance (y) 355 356 IF ( iom_use( "icestr" ) ) CALL iom_put( "icestr" , strength(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice strength 357 358 IF ( iom_use( "dssh_dx" ) ) CALL iom_put( "dssh_dx" , diag_dssh_dx(:,:) * zswi(:,:) + zmiss(:,:) ) ! Sea-surface tilt term in force balance (x) 359 IF ( iom_use( "dssh_dy" ) ) CALL iom_put( "dssh_dy" , diag_dssh_dy(:,:) * zswi(:,:) + zmiss(:,:) ) ! Sea-surface tilt term in force balance (y) 360 361 IF ( iom_use( "corstrx" ) ) CALL iom_put( "corstrx" , diag_corstrx(:,:) * zswi(:,:) + zmiss(:,:) ) ! Coriolis force term in force balance (x) 362 IF ( iom_use( "corstry" ) ) CALL iom_put( "corstry" , diag_corstry(:,:) * zswi(:,:) + zmiss(:,:) ) ! Coriolis force term in force balance (y) 363 364 IF ( iom_use( "intstrx" ) ) CALL iom_put( "intstrx" , diag_intstrx(:,:) * zswi(:,:) + zmiss(:,:) ) ! Internal force term in force balance (x) 365 IF ( iom_use( "intstry" ) ) CALL iom_put( "intstry" , diag_intstry(:,:) * zswi(:,:) + zmiss(:,:) ) ! Internal force term in force balance (y) 366 367 IF ( iom_use( "normstr" ) ) CALL iom_put( "normstr" , diag_sig1(:,:) * zswi(:,:) + zmiss(:,:) ) ! Normal stress 368 IF ( iom_use( "sheastr" ) ) CALL iom_put( "sheastr" , diag_sig2(:,:) * zswi(:,:) + zmiss(:,:) ) ! Shear stress 374 369 375 370 !-------------------------------- 376 371 ! Global ice diagnostics (SIMIP) 377 372 !-------------------------------- 378 379 IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) .OR. iom_use( "NH_iceextt" ) ) THEN ! NH integrateddiagnostics380 381 WHERE( ff_t > 0._wp ) ;zswi(:,:) = 1.0e-12382 ELSEWHERE ;zswi(:,:) = 0.373 ! 374 IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) .OR. iom_use( "NH_iceextt" ) ) THEN ! NH diagnostics 375 ! 376 WHERE( ff_t > 0._wp ) ; zswi(:,:) = 1.0e-12 377 ELSEWHERE ; zswi(:,:) = 0. 383 378 END WHERE 384 385 379 zdiag_area_nh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 386 380 zdiag_volu_nh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 387 388 WHERE( ff_t > 0._wp .AND. at_i > 0.15 ) ; zswi(:,:) = 1.0e-12389 ELSEWHERE ; zswi(:,:) = 0.381 ! 382 WHERE( ff_t > 0._wp .AND. at_i > 0.15 ) ; zswi(:,:) = 1.0e-12 383 ELSEWHERE ; zswi(:,:) = 0. 390 384 END WHERE 391 392 385 zdiag_extt_nh = glob_sum( zswi(:,:) * e1e2t(:,:) ) 393 394 IF ( iom_use( "NH_icearea" ) ) CALL iom_put( "NH_icearea" , zdiag_area_nh )395 IF ( iom_use( "NH_icevolu" ) ) CALL iom_put( "NH_icevolu" , zdiag_volu_nh )396 IF ( iom_use( "NH_iceextt" ) ) CALL iom_put( "NH_iceextt" , zdiag_extt_nh )397 398 ENDIF 399 400 IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) .OR. iom_use( "SH_iceextt" ) ) THEN ! SH integrateddiagnostics401 386 ! 387 IF ( iom_use( "NH_icearea" ) ) CALL iom_put( "NH_icearea" , zdiag_area_nh ) 388 IF ( iom_use( "NH_icevolu" ) ) CALL iom_put( "NH_icevolu" , zdiag_volu_nh ) 389 IF ( iom_use( "NH_iceextt" ) ) CALL iom_put( "NH_iceextt" , zdiag_extt_nh ) 390 ! 391 ENDIF 392 ! 393 IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) .OR. iom_use( "SH_iceextt" ) ) THEN ! SH diagnostics 394 ! 402 395 WHERE( ff_t < 0._wp ); zswi(:,:) = 1.0e-12; 403 396 ELSEWHERE ; zswi(:,:) = 0. 404 397 END WHERE 405 406 398 zdiag_area_sh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 407 399 zdiag_volu_sh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 408 400 ! 409 401 WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12 410 402 ELSEWHERE ; zswi(:,:) = 0. 411 403 END WHERE 412 413 404 zdiag_extt_sh = glob_sum( zswi(:,:) * e1e2t(:,:) ) 414 405 ! 415 406 IF ( iom_use( "SH_icearea" ) ) CALL iom_put( "SH_icearea", zdiag_area_sh ) 416 407 IF ( iom_use( "SH_icevolu" ) ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) 417 408 IF ( iom_use( "SH_iceextt" ) ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) 418 409 ! 419 410 ENDIF 420 421 ! ! Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 422 ! IF( kindic < 0 ) CALL ice_wri_state( 'output.abort' ) 423 ! not yet implemented 424 411 ! 412 !!CR ! ! Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 413 !!CR ! IF( kindic < 0 ) CALL ice_wri_state( 'output.abort' ) 414 !!CR ! not yet implemented 415 !!gm idem for the ocean... Ask Seb how to get read of ioipsl.... 416 ! 425 417 IF( nn_timing == 1 ) CALL timing_stop('icewri') 426 418 ! 427 419 END SUBROUTINE ice_wri 428 420 … … 437 429 !! ocean state in case of abnormal end of a simulation 438 430 !! 439 !! History : 440 !! 4.0 ! 2013-06 (C. Rousset) 431 !! History : 4.0 ! 2013-06 (C. Rousset) 441 432 !!---------------------------------------------------------------------- 442 433 INTEGER, INTENT( in ) :: kt ! ocean time-step index) … … 445 436 REAL(wp), DIMENSION(jpl) :: jcat 446 437 !!---------------------------------------------------------------------- 438 ! 447 439 DO jl = 1, jpl 448 440 jcat(jl) = REAL(jl) 449 END DO441 END DO 450 442 451 443 CALL histvert( kid, "ncatice", "Ice Categories","", jpl, jcat, nz_i, "up") … … 557 549 ! Close the file 558 550 ! ----------------- 551 !!gm I don't understand why the file is not closed ! 559 552 !CALL histclo( kid ) 560 553 ! 561 554 END SUBROUTINE ice_wri_state 562 555 … … 565 558 !! Default option : Empty module NO LIM sea-ice model 566 559 !!---------------------------------------------------------------------- 567 CONTAINS568 SUBROUTINE ice_wri ! Empty routine569 END SUBROUTINE ice_wri570 560 #endif 571 561
Note: See TracChangeset
for help on using the changeset viewer.