[8586] | 1 | MODULE icewri |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE icewri *** |
---|
| 4 | !! sea-ice : output ice variables |
---|
| 5 | !!====================================================================== |
---|
| 6 | #if defined key_lim3 |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! 'key_lim3' ESIM sea-ice model |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! ice_wri : write of the diagnostics variables in ouput file |
---|
| 11 | !! ice_wri_state : write for initial state or/and abandon |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 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 |
---|
| 20 | ! |
---|
| 21 | USE ioipsl ! |
---|
| 22 | USE in_out_manager ! I/O manager |
---|
| 23 | USE iom ! I/O manager library |
---|
| 24 | USE lib_mpp ! MPP library |
---|
| 25 | USE lib_fortran ! fortran utilities (glob_sum + no signed zero) |
---|
| 26 | USE lbclnk ! lateral boundary conditions (or mpp links) |
---|
| 27 | USE timing ! Timing |
---|
| 28 | |
---|
| 29 | IMPLICIT NONE |
---|
| 30 | PRIVATE |
---|
| 31 | |
---|
| 32 | PUBLIC ice_wri ! called by ice_stp |
---|
| 33 | PUBLIC ice_wri_state ! called by dia_wri_state |
---|
| 34 | |
---|
| 35 | !!---------------------------------------------------------------------- |
---|
| 36 | !! NEMO/ICE 4.0 , NEMO Consortium (2017) |
---|
| 37 | !! $Id: icewri.F90 8409 2017-08-07 15:29:21Z clem $ |
---|
| 38 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 39 | !!---------------------------------------------------------------------- |
---|
| 40 | CONTAINS |
---|
| 41 | |
---|
| 42 | SUBROUTINE ice_wri( kt ) |
---|
| 43 | !!------------------------------------------------------------------- |
---|
| 44 | !! This routine computes the average of some variables and write it |
---|
| 45 | !! on the ouput files. |
---|
| 46 | !!------------------------------------------------------------------- |
---|
| 47 | INTEGER, INTENT(in) :: kt ! time-step |
---|
| 48 | ! |
---|
| 49 | INTEGER :: ji, jj, jk, jl ! dummy loop indices |
---|
| 50 | REAL(wp) :: z2da, z2db, zrho1, zrho2, zmiss_val |
---|
| 51 | REAL(wp), DIMENSION(jpi,jpj) :: z2d, zswi, zmiss ! 2D workspace |
---|
| 52 | REAL(wp), DIMENSION(jpi,jpj) :: zfb ! ice freeboard |
---|
[8823] | 53 | REAL(wp), DIMENSION(jpi,jpj) :: zmsk05, zmsk15 ! 15% concentration mask |
---|
[8586] | 54 | REAL(wp), DIMENSION(jpi,jpj,jpl) :: zswi2, zmiss2 |
---|
| 55 | ! |
---|
| 56 | ! Global ice diagnostics (SIMIP) |
---|
| 57 | REAL(wp) :: zdiag_area_nh, zdiag_extt_nh, zdiag_volu_nh ! area, extent, volume |
---|
| 58 | REAL(wp) :: zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh |
---|
| 59 | !!------------------------------------------------------------------- |
---|
| 60 | |
---|
| 61 | IF( nn_timing == 1 ) CALL timing_start('icewri') |
---|
| 62 | |
---|
| 63 | !---------------------------------------- |
---|
| 64 | ! Brine volume, switches, missing values |
---|
| 65 | !---------------------------------------- |
---|
| 66 | |
---|
| 67 | CALL ice_var_bv ! brine volume |
---|
| 68 | |
---|
| 69 | ! tresholds for outputs |
---|
| 70 | DO jj = 1, jpj |
---|
| 71 | DO ji = 1, jpi |
---|
| 72 | zswi(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice |
---|
[8823] | 73 | zmsk05(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.05 ) ) ! 1 if 5% ice, 0 if less - required to mask thickness and snow depth |
---|
| 74 | zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15 ) ) ! 1 if 15% ice, 0 if less |
---|
[8586] | 75 | END DO |
---|
| 76 | END DO |
---|
| 77 | DO jl = 1, jpl |
---|
| 78 | DO jj = 1, jpj |
---|
| 79 | DO ji = 1, jpi |
---|
| 80 | zswi2(ji,jj,jl) = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) |
---|
| 81 | END DO |
---|
| 82 | END DO |
---|
| 83 | END DO |
---|
| 84 | |
---|
| 85 | zmiss_val = 1.e20_wp |
---|
| 86 | zmiss (:,:) = zmiss_val * ( 1._wp - zswi (:,:) ) |
---|
| 87 | zmiss2(:,:,:) = zmiss_val * ( 1._wp - zswi2(:,:,:) ) |
---|
| 88 | |
---|
| 89 | !---------------------------------------- |
---|
| 90 | ! Standard outputs |
---|
| 91 | !---------------------------------------- |
---|
| 92 | ! velocity |
---|
[8823] | 93 | IF( iom_use('uice') ) CALL iom_put( "uice" , u_ice ) ! ice velocity u component |
---|
| 94 | IF( iom_use('vice') ) CALL iom_put( "vice" , v_ice ) ! ice velocity v component |
---|
[8586] | 95 | |
---|
| 96 | IF( iom_use('icevel') .OR. iom_use('icevel_mv') ) THEN |
---|
| 97 | DO jj = 2 , jpjm1 |
---|
| 98 | DO ji = 2 , jpim1 |
---|
| 99 | z2da = ( u_ice(ji,jj) + u_ice(ji-1,jj) ) |
---|
| 100 | z2db = ( v_ice(ji,jj) + v_ice(ji,jj-1) ) |
---|
| 101 | z2d(ji,jj) = 0.5_wp * SQRT( z2da * z2da + z2db * z2db ) |
---|
| 102 | END DO |
---|
| 103 | END DO |
---|
| 104 | CALL lbc_lnk( z2d, 'T', 1. ) |
---|
| 105 | IF( iom_use('icevel' ) ) CALL iom_put( "icevel" , z2d ) ! ice velocity module |
---|
| 106 | IF( iom_use('icevel_mv') ) CALL iom_put( "icevel_mv" , z2d(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity module (missing value) |
---|
| 107 | ENDIF |
---|
| 108 | ! |
---|
[8823] | 109 | IF( iom_use('miceage') ) CALL iom_put( "miceage" , om_i * zswi * zmsk15 ) ! mean ice age |
---|
[8586] | 110 | IF( iom_use('micet') ) CALL iom_put( "micet" , ( tm_i - rt0 ) * zswi ) ! ice mean temperature |
---|
| 111 | IF( iom_use('icest') ) CALL iom_put( "icest" , ( tm_su - rt0 ) * zswi ) ! ice surface temperature |
---|
| 112 | IF( iom_use('icecolf') ) CALL iom_put( "icecolf" , ht_i_new ) ! new ice thickness formed in the leads |
---|
| 113 | ! |
---|
| 114 | CALL iom_put( "iceconc" , at_i * zswi ) ! ice concentration |
---|
| 115 | CALL iom_put( "icevolu" , vt_i * zswi ) ! ice volume = mean ice thickness over the cell |
---|
| 116 | CALL iom_put( "icethick" , hm_i * zswi ) ! ice thickness |
---|
| 117 | CALL iom_put( "icehc" , et_i * zswi ) ! ice total heat content |
---|
| 118 | CALL iom_put( "isnowhc" , et_s * zswi ) ! snow total heat content |
---|
| 119 | CALL iom_put( "ibrinv" , bvm_i * zswi * 100. ) ! brine volume |
---|
| 120 | CALL iom_put( "micesalt" , sm_i * zswi ) ! mean ice salinity |
---|
| 121 | CALL iom_put( "snowvol" , vt_s * zswi ) ! snow volume |
---|
| 122 | |
---|
[8637] | 123 | CALL iom_put( "iceamp" , at_ip * zswi ) ! melt pond total fraction |
---|
| 124 | CALL iom_put( "icevmp" , vt_ip * zswi ) ! melt pond total volume per unit area |
---|
[8586] | 125 | |
---|
| 126 | !---------------------------------- |
---|
| 127 | ! Output category-dependent fields |
---|
| 128 | !---------------------------------- |
---|
| 129 | IF ( iom_use('iceconc_cat' ) ) CALL iom_put( "iceconc_cat" , a_i * zswi2 ) ! area for categories |
---|
| 130 | IF ( iom_use('icethic_cat' ) ) CALL iom_put( "icethic_cat" , h_i * zswi2 ) ! thickness for categories |
---|
| 131 | IF ( iom_use('snowthic_cat') ) CALL iom_put( "snowthic_cat" , h_s * zswi2 ) ! snow depth for categories |
---|
| 132 | IF ( iom_use('salinity_cat') ) CALL iom_put( "salinity_cat" , s_i * zswi2 ) ! salinity for categories |
---|
| 133 | IF ( iom_use('icetemp_cat' ) ) CALL iom_put( "icetemp_cat", ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zswi2 ) ! ice temperature |
---|
| 134 | IF ( iom_use('snwtemp_cat' ) ) CALL iom_put( "snwtemp_cat", ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zswi2 ) ! snow temperature |
---|
| 135 | IF ( iom_use('iceage_cat' ) ) CALL iom_put( "iceage_cat" , o_i * zswi2 ) ! ice age |
---|
| 136 | IF ( iom_use('brinevol_cat') ) CALL iom_put( "brinevol_cat", bv_i * 100. * zswi2 ) ! brine volume |
---|
| 137 | |
---|
[8637] | 138 | IF ( iom_use('iceamp_cat') ) CALL iom_put( "iceamp_cat" , a_ip * zswi2 ) ! melt pond frac for categories |
---|
| 139 | IF ( iom_use('icevmp_cat') ) CALL iom_put( "icevmp_cat" , v_ip * zswi2 ) ! melt pond frac for categories |
---|
| 140 | IF ( iom_use('icehmp_cat') ) CALL iom_put( "icehmp_cat" , h_ip * zswi2 ) ! melt pond frac for categories |
---|
| 141 | IF ( iom_use('iceafp_cat') ) CALL iom_put( "iceafp_cat" , a_ip_frac * zswi2 ) ! melt pond frac for categories |
---|
[8586] | 142 | |
---|
| 143 | !-------------------------------- |
---|
| 144 | ! Add-ons for SIMIP |
---|
| 145 | !-------------------------------- |
---|
| 146 | zrho1 = ( rau0 - rhoic ) * r1_rau0; zrho2 = rhosn * r1_rau0 |
---|
| 147 | |
---|
| 148 | IF ( iom_use( "icepres" ) ) CALL iom_put( "icepres" , zswi(:,:) ) ! Ice presence (1 or 0) |
---|
| 149 | IF ( iom_use( "icemass" ) ) CALL iom_put( "icemass" , rhoic * vt_i(:,:) * zswi(:,:) ) ! Ice mass per cell area |
---|
[8823] | 150 | IF ( iom_use( "icethic" ) ) CALL iom_put( "icethic" , hm_i(:,:) * zmsk05(:,:) + ( 1. - zmsk05(:,:) ) * zmiss_val ) ! Ice thickness |
---|
[8586] | 151 | IF ( iom_use( "snomass" ) ) CALL iom_put( "snomass" , rhosn * vt_s(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow mass per cell area |
---|
[8823] | 152 | IF ( iom_use( "snothic" ) ) CALL iom_put( "snothic" , hm_s(:,:) * zmsk05(:,:) + ( 1. - zmsk05(:,:) ) * zmiss_val ) ! Snow thickness |
---|
[8586] | 153 | |
---|
| 154 | IF ( iom_use( "iceconc_cat_mv" ) ) CALL iom_put( "iceconc_cat_mv" , a_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Area for categories |
---|
| 155 | IF ( iom_use( "icethic_cat_mv" ) ) CALL iom_put( "icethic_cat_mv" , h_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Thickness for categories |
---|
| 156 | IF ( iom_use( "snowthic_cat_mv" ) ) CALL iom_put( "snowthic_cat_mv", h_s(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) ) ! Snow depth for categories |
---|
| 157 | |
---|
| 158 | IF ( iom_use( "icestK" ) ) CALL iom_put( "icestK" , tm_su(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice surface temperature |
---|
| 159 | IF ( iom_use( "icesntK" ) ) CALL iom_put( "icesntK" , tm_si(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow-ice interface temperature |
---|
| 160 | IF ( iom_use( "icebotK" ) ) CALL iom_put( "icebotK" , t_bo(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice bottom temperature |
---|
[8823] | 161 | IF ( iom_use( "iceage" ) ) CALL iom_put( "iceage" , om_i(:,:) * zmsk15(:,:) + ( 1. - zmsk15(:,:) ) * zmiss_val ) ! Ice age |
---|
[8586] | 162 | IF ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass" , SUM( sv_i, DIM = 3 ) * rhoic * 1.0e-3 * zswi(:,:) ) ! Mass of salt in sea ice per cell area |
---|
| 163 | IF ( iom_use( "icesal" ) ) CALL iom_put( "icesal" , sm_i(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice salinity |
---|
| 164 | |
---|
| 165 | IF ( iom_use( "icefb" ) ) THEN |
---|
| 166 | zfb(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) ) |
---|
| 167 | WHERE( zfb < 0._wp ) ; zfb = 0._wp ; END WHERE |
---|
| 168 | CALL iom_put( "icefb" , zfb(:,:) * zswi(:,:) + zmiss(:,:) ) ! Ice freeboard |
---|
| 169 | ENDIF |
---|
| 170 | |
---|
| 171 | IF ( iom_use( "isnhcneg" ) ) CALL iom_put( "isnhcneg" , - et_s(:,:) * zswi(:,:) + zmiss(:,:) ) ! Snow total heat content |
---|
| 172 | |
---|
| 173 | IF ( iom_use( "dmithd" ) ) CALL iom_put( "dmithd" , - wfx_bog - wfx_bom - wfx_sum & ! Sea-ice mass change from thermodynamics |
---|
| 174 | & - wfx_sni - wfx_opw - wfx_res ) |
---|
| 175 | IF ( iom_use( "dmidyn" ) ) CALL iom_put( "dmidyn" , - wfx_dyn(:,:) + rhoic * diag_trp_vi(:,:) ) ! Sea-ice mass change from dynamics(kg/m2/s) |
---|
| 176 | IF ( iom_use( "dmiopw" ) ) CALL iom_put( "dmiopw" , - wfx_opw ) ! Sea-ice mass change through growth in open water |
---|
| 177 | IF ( iom_use( "dmibog" ) ) CALL iom_put( "dmibog" , - wfx_bog ) ! Sea-ice mass change through basal growth |
---|
| 178 | IF ( iom_use( "dmisni" ) ) CALL iom_put( "dmisni" , - wfx_sni ) ! Sea-ice mass change through snow-to-ice conversion |
---|
| 179 | IF ( iom_use( "dmisum" ) ) CALL iom_put( "dmisum" , - wfx_sum ) ! Sea-ice mass change through surface melting |
---|
| 180 | IF ( iom_use( "dmibom" ) ) CALL iom_put( "dmibom" , - wfx_bom ) ! Sea-ice mass change through bottom melting |
---|
| 181 | |
---|
| 182 | IF ( iom_use( "dmtsub" ) ) CALL iom_put( "dmtsub" , - wfx_sub ) ! Sea-ice mass change through evaporation and sublimation |
---|
| 183 | IF ( iom_use( "dmssub" ) ) CALL iom_put( "dmssub" , - wfx_snw_sub ) ! Snow mass change through sublimation |
---|
| 184 | IF ( iom_use( "dmisub" ) ) CALL iom_put( "dmisub" , - wfx_ice_sub ) ! Sea-ice mass change through sublimation |
---|
| 185 | |
---|
| 186 | IF ( iom_use( "dmsspr" ) ) CALL iom_put( "dmsspr" , - wfx_spr ) ! Snow mass change through snow fall |
---|
| 187 | IF ( iom_use( "dmsssi" ) ) CALL iom_put( "dmsssi" , wfx_sni*rhosn*r1_rhoic ) ! Snow mass change through snow-to-ice conversion |
---|
| 188 | |
---|
| 189 | IF ( iom_use( "dmsmel" ) ) CALL iom_put( "dmsmel" , - wfx_snw_sum ) ! Snow mass change through melt |
---|
| 190 | IF ( iom_use( "dmsdyn" ) ) CALL iom_put( "dmsdyn" , - wfx_snw_dyn(:,:) + rhosn * diag_trp_vs(:,:) ) ! Snow mass change through dynamics(kg/m2/s) |
---|
| 191 | |
---|
| 192 | IF ( iom_use( "hfxsenso" ) ) CALL iom_put( "hfxsenso" , -fhtur(:,:) * zswi(:,:) + zmiss(:,:) ) ! Sensible oceanic heat flux |
---|
| 193 | IF ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo" , diag_fc_bo * zswi(:,:) + zmiss(:,:) ) ! Bottom conduction flux |
---|
| 194 | IF ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu" , diag_fc_su * zswi(:,:) + zmiss(:,:) ) ! Surface conduction flux |
---|
| 195 | |
---|
| 196 | IF ( iom_use( "wfxtot" ) ) CALL iom_put( "wfxtot" , wfx_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Total freshwater flux from sea ice |
---|
| 197 | IF ( iom_use( "wfxsum" ) ) CALL iom_put( "wfxsum" , wfx_sum(:,:) * zswi(:,:) + zmiss(:,:) ) ! Freshwater flux from sea-ice surface |
---|
| 198 | IF ( iom_use( "sfx_mv" ) ) CALL iom_put( "sfx_mv" , sfx(:,:) * 0.001 * zswi(:,:) + zmiss(:,:) ) ! Total salt flux |
---|
| 199 | |
---|
| 200 | IF ( iom_use( "uice_mv" ) ) CALL iom_put( "uice_mv" , u_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity u component |
---|
| 201 | IF ( iom_use( "vice_mv" ) ) CALL iom_put( "vice_mv" , v_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! ice velocity v component |
---|
| 202 | |
---|
| 203 | IF ( iom_use( "utau_ice" ) ) CALL iom_put( "utau_ice" , utau_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Wind stress term in force balance (x) |
---|
| 204 | IF ( iom_use( "vtau_ice" ) ) CALL iom_put( "vtau_ice" , vtau_ice(:,:) * zswi(:,:) + zmiss(:,:) ) ! Wind stress term in force balance (y) |
---|
| 205 | |
---|
| 206 | !-------------------------------- |
---|
| 207 | ! Global ice diagnostics (SIMIP) |
---|
| 208 | !-------------------------------- |
---|
| 209 | ! |
---|
| 210 | IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) .OR. iom_use( "NH_iceextt" ) ) THEN ! NH diagnostics |
---|
| 211 | ! |
---|
| 212 | WHERE( ff_t > 0._wp ) ; zswi(:,:) = 1.0e-12 |
---|
| 213 | ELSEWHERE ; zswi(:,:) = 0. |
---|
| 214 | END WHERE |
---|
| 215 | zdiag_area_nh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) ) |
---|
| 216 | zdiag_volu_nh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) |
---|
| 217 | ! |
---|
| 218 | WHERE( ff_t > 0._wp .AND. at_i > 0.15 ) ; zswi(:,:) = 1.0e-12 |
---|
| 219 | ELSEWHERE ; zswi(:,:) = 0. |
---|
| 220 | END WHERE |
---|
| 221 | zdiag_extt_nh = glob_sum( zswi(:,:) * e1e2t(:,:) ) |
---|
| 222 | ! |
---|
| 223 | IF ( iom_use( "NH_icearea" ) ) CALL iom_put( "NH_icearea" , zdiag_area_nh ) |
---|
| 224 | IF ( iom_use( "NH_icevolu" ) ) CALL iom_put( "NH_icevolu" , zdiag_volu_nh ) |
---|
| 225 | IF ( iom_use( "NH_iceextt" ) ) CALL iom_put( "NH_iceextt" , zdiag_extt_nh ) |
---|
| 226 | ! |
---|
| 227 | ENDIF |
---|
| 228 | ! |
---|
| 229 | IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) .OR. iom_use( "SH_iceextt" ) ) THEN ! SH diagnostics |
---|
| 230 | ! |
---|
| 231 | WHERE( ff_t < 0._wp ); zswi(:,:) = 1.0e-12; |
---|
| 232 | ELSEWHERE ; zswi(:,:) = 0. |
---|
| 233 | END WHERE |
---|
| 234 | zdiag_area_sh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) ) |
---|
| 235 | zdiag_volu_sh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) |
---|
| 236 | ! |
---|
| 237 | WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12 |
---|
| 238 | ELSEWHERE ; zswi(:,:) = 0. |
---|
| 239 | END WHERE |
---|
| 240 | zdiag_extt_sh = glob_sum( zswi(:,:) * e1e2t(:,:) ) |
---|
| 241 | ! |
---|
| 242 | IF ( iom_use( "SH_icearea" ) ) CALL iom_put( "SH_icearea", zdiag_area_sh ) |
---|
| 243 | IF ( iom_use( "SH_icevolu" ) ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) |
---|
| 244 | IF ( iom_use( "SH_iceextt" ) ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) |
---|
| 245 | ! |
---|
| 246 | ENDIF |
---|
| 247 | ! |
---|
| 248 | !!CR ! ! Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s |
---|
| 249 | !!CR ! IF( kindic < 0 ) CALL ice_wri_state( 'output.abort' ) |
---|
| 250 | !!CR ! not yet implemented |
---|
| 251 | !!gm idem for the ocean... Ask Seb how to get read of ioipsl.... |
---|
| 252 | ! |
---|
| 253 | IF( nn_timing == 1 ) CALL timing_stop('icewri') |
---|
| 254 | ! |
---|
| 255 | END SUBROUTINE ice_wri |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | SUBROUTINE ice_wri_state( kt, kid, kh_i ) |
---|
| 259 | !!--------------------------------------------------------------------- |
---|
| 260 | !! *** ROUTINE ice_wri_state *** |
---|
| 261 | !! |
---|
| 262 | !! ** Purpose : create a NetCDF file named cdfile_name which contains |
---|
| 263 | !! the instantaneous ice state and forcing fields for ice model |
---|
| 264 | !! Used to find errors in the initial state or save the last |
---|
| 265 | !! ocean state in case of abnormal end of a simulation |
---|
| 266 | !! |
---|
| 267 | !! History : 4.0 ! 2013-06 (C. Rousset) |
---|
| 268 | !!---------------------------------------------------------------------- |
---|
| 269 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 270 | INTEGER, INTENT( in ) :: kid , kh_i |
---|
| 271 | INTEGER :: nz_i, jl |
---|
| 272 | REAL(wp), DIMENSION(jpl) :: jcat |
---|
| 273 | !!---------------------------------------------------------------------- |
---|
| 274 | ! |
---|
| 275 | DO jl = 1, jpl |
---|
| 276 | jcat(jl) = REAL(jl) |
---|
| 277 | END DO |
---|
| 278 | |
---|
| 279 | CALL histvert( kid, "ncatice", "Ice Categories","", jpl, jcat, nz_i, "up") |
---|
| 280 | |
---|
| 281 | CALL histdef( kid, "sithic", "Ice thickness" , "m" , & |
---|
| 282 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 283 | CALL histdef( kid, "siconc", "Ice concentration" , "%" , & |
---|
| 284 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 285 | CALL histdef( kid, "sitemp", "Ice temperature" , "C" , & |
---|
| 286 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 287 | CALL histdef( kid, "sivelu", "i-Ice speed " , "m/s" , & |
---|
| 288 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 289 | CALL histdef( kid, "sivelv", "j-Ice speed " , "m/s" , & |
---|
| 290 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 291 | CALL histdef( kid, "sistru", "i-Wind stress over ice " , "Pa" , & |
---|
| 292 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 293 | CALL histdef( kid, "sistrv", "j-Wind stress over ice " , "Pa" , & |
---|
| 294 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 295 | CALL histdef( kid, "sisflx", "Solar flux over ocean" , "w/m2" , & |
---|
| 296 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 297 | CALL histdef( kid, "sinflx", "Non-solar flux over ocean" , "w/m2" , & |
---|
| 298 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 299 | CALL histdef( kid, "isnowpre", "Snow precipitation" , "kg/m2/s", & |
---|
| 300 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 301 | CALL histdef( kid, "sisali", "Ice salinity" , "PSU" , & |
---|
| 302 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 303 | CALL histdef( kid, "sivolu", "Ice volume" , "m" , & |
---|
| 304 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 305 | CALL histdef( kid, "sidive", "Ice divergence" , "10-8s-1", & |
---|
| 306 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
[8637] | 307 | CALL histdef( kid, "si_amp", "Melt pond fraction" , "%" , & |
---|
| 308 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 309 | CALL histdef( kid, "si_vmp", "Melt pond volume" , "m" , & |
---|
| 310 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
[8586] | 311 | CALL histdef( kid, "vfxbog", "Ice bottom production" , "m/s" , & |
---|
| 312 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 313 | CALL histdef( kid, "vfxdyn", "Ice dynamic production" , "m/s" , & |
---|
| 314 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 315 | CALL histdef( kid, "vfxopw", "Ice open water prod" , "m/s" , & |
---|
| 316 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 317 | CALL histdef( kid, "vfxsni", "Snow ice production " , "m/s" , & |
---|
| 318 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 319 | CALL histdef( kid, "vfxres", "Ice prod from corrections" , "m/s" , & |
---|
| 320 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 321 | CALL histdef( kid, "vfxbom", "Ice bottom melt" , "m/s" , & |
---|
| 322 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
| 323 | CALL histdef( kid, "vfxsum", "Ice surface melt" , "m/s" , & |
---|
| 324 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
[8706] | 325 | CALL histdef( kid, "vfxpnd", "Ice melt ponds flux" , "m/s" , & |
---|
| 326 | & jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) |
---|
[8586] | 327 | |
---|
| 328 | CALL histdef( kid, "sithicat", "Ice thickness" , "m" , & |
---|
| 329 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 330 | CALL histdef( kid, "siconcat", "Ice concentration" , "%" , & |
---|
| 331 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 332 | CALL histdef( kid, "sisalcat", "Ice salinity" , "" , & |
---|
| 333 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 334 | CALL histdef( kid, "sitemcat", "Ice temperature" , "C" , & |
---|
| 335 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 336 | CALL histdef( kid, "snthicat", "Snw thickness" , "m" , & |
---|
| 337 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 338 | CALL histdef( kid, "sntemcat", "Snw temperature" , "C" , & |
---|
| 339 | & jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) |
---|
| 340 | |
---|
| 341 | CALL histend( kid, snc4set ) ! end of the file definition |
---|
| 342 | |
---|
| 343 | CALL histwrite( kid, "sithic", kt, hm_i , jpi*jpj, (/1/) ) |
---|
| 344 | CALL histwrite( kid, "siconc", kt, at_i , jpi*jpj, (/1/) ) |
---|
| 345 | CALL histwrite( kid, "sitemp", kt, tm_i - rt0 , jpi*jpj, (/1/) ) |
---|
| 346 | CALL histwrite( kid, "sivelu", kt, u_ice , jpi*jpj, (/1/) ) |
---|
| 347 | CALL histwrite( kid, "sivelv", kt, v_ice , jpi*jpj, (/1/) ) |
---|
| 348 | CALL histwrite( kid, "sistru", kt, utau_ice , jpi*jpj, (/1/) ) |
---|
| 349 | CALL histwrite( kid, "sistrv", kt, vtau_ice , jpi*jpj, (/1/) ) |
---|
| 350 | CALL histwrite( kid, "sisflx", kt, qsr , jpi*jpj, (/1/) ) |
---|
| 351 | CALL histwrite( kid, "sinflx", kt, qns , jpi*jpj, (/1/) ) |
---|
| 352 | CALL histwrite( kid, "isnowpre", kt, sprecip , jpi*jpj, (/1/) ) |
---|
| 353 | CALL histwrite( kid, "sisali", kt, sm_i , jpi*jpj, (/1/) ) |
---|
| 354 | CALL histwrite( kid, "sivolu", kt, vt_i , jpi*jpj, (/1/) ) |
---|
| 355 | CALL histwrite( kid, "sidive", kt, divu_i*1.0e8 , jpi*jpj, (/1/) ) |
---|
| 356 | |
---|
[8637] | 357 | CALL histwrite( kid, "si_amp", kt, at_ip , jpi*jpj, (/1/) ) |
---|
| 358 | CALL histwrite( kid, "si_vmp", kt, vt_ip , jpi*jpj, (/1/) ) |
---|
[8586] | 359 | |
---|
| 360 | CALL histwrite( kid, "vfxbog", kt, wfx_bog , jpi*jpj, (/1/) ) |
---|
| 361 | CALL histwrite( kid, "vfxdyn", kt, wfx_dyn , jpi*jpj, (/1/) ) |
---|
| 362 | CALL histwrite( kid, "vfxopw", kt, wfx_opw , jpi*jpj, (/1/) ) |
---|
| 363 | CALL histwrite( kid, "vfxsni", kt, wfx_sni , jpi*jpj, (/1/) ) |
---|
| 364 | CALL histwrite( kid, "vfxres", kt, wfx_res , jpi*jpj, (/1/) ) |
---|
| 365 | CALL histwrite( kid, "vfxbom", kt, wfx_bom , jpi*jpj, (/1/) ) |
---|
| 366 | CALL histwrite( kid, "vfxsum", kt, wfx_sum , jpi*jpj, (/1/) ) |
---|
[8637] | 367 | CALL histwrite( kid, "vfxpnd", kt, wfx_pnd , jpi*jpj, (/1/) ) |
---|
[8586] | 368 | |
---|
| 369 | CALL histwrite( kid, "sithicat", kt, h_i , jpi*jpj*jpl, (/1/) ) |
---|
| 370 | CALL histwrite( kid, "siconcat", kt, a_i , jpi*jpj*jpl, (/1/) ) |
---|
| 371 | CALL histwrite( kid, "sisalcat", kt, s_i , jpi*jpj*jpl, (/1/) ) |
---|
| 372 | CALL histwrite( kid, "sitemcat", kt, tm_i - rt0 , jpi*jpj*jpl, (/1/) ) |
---|
| 373 | CALL histwrite( kid, "snthicat", kt, h_s , jpi*jpj*jpl, (/1/) ) |
---|
| 374 | CALL histwrite( kid, "sntemcat", kt, tm_su - rt0 , jpi*jpj*jpl, (/1/) ) |
---|
| 375 | |
---|
| 376 | !! The file is closed in dia_wri_state (ocean routine) |
---|
| 377 | !! CALL histclo( kid ) |
---|
| 378 | ! |
---|
| 379 | END SUBROUTINE ice_wri_state |
---|
| 380 | |
---|
| 381 | #else |
---|
| 382 | !!---------------------------------------------------------------------- |
---|
| 383 | !! Default option : Empty module NO ESIM sea-ice model |
---|
| 384 | !!---------------------------------------------------------------------- |
---|
| 385 | #endif |
---|
| 386 | |
---|
| 387 | !!====================================================================== |
---|
| 388 | END MODULE icewri |
---|