New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4655 – NEMO

Changeset 4655


Ignore:
Timestamp:
2014-06-03T17:28:33+02:00 (10 years ago)
Author:
clem
Message:

cleaning LIM3 outputs for NEMO3.4

Location:
branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90

    r4649 r4655  
    8585      ! 
    8686      ! 
    87       CALL iom_put( "iceconc"      , at_i               )        ! ice concentration 
    8887      !                                              
    89       DO jj = 1, jpj                                             ! mean ice thickness 
    90          DO ji = 1, jpi 
    91             z2d(ji,jj)  = vt_i(ji,jj) / MAX( at_i(ji,jj), epsi06 ) * zind(ji,jj) 
    92          END DO 
    93       END DO 
    94       CALL iom_put( "icethic_cea"  , z2d                 )       ! ice thickness (i.e. icethi(:,:)) 
    95       CALL iom_put( "icevolu"      , vt_i                )       ! ice volume = mean ice thickness over the cell 
    96       DO jj = 1, jpj                                             
    97          DO ji = 1, jpi 
    98             z2d(ji,jj)  = vt_s(ji,jj) / MAX( at_i(ji,jj), epsi06 ) * zind(ji,jj) 
    99          END DO 
    100       END DO 
    101       CALL iom_put( "snowthic_cea" , z2d                 )       ! snow thickness = mean snow thickness over the cell 
    102       CALL iom_put( "isst"         , sst_m               )       ! sea surface temperature 
    103       CALL iom_put( "isss"         , sss_m               )       ! sea surface salinity 
    104       ! 
    105       DO jj = 2 , jpjm1 
    106          DO ji = 2 , jpim1 
    107             z2da(ji,jj)  = (  u_ice(ji,jj) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) ) * 0.5_wp 
    108             z2db(ji,jj)  = (  v_ice(ji,jj) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) ) * 0.5_wp 
    109         END DO 
    110       END DO 
    111       CALL lbc_lnk( z2da, 'T', -1. ) 
    112       CALL lbc_lnk( z2db, 'T', -1. ) 
    113       DO jj = 1, jpj                                  
    114          DO ji = 1, jpi 
    115             z2d(ji,jj)  = SQRT( z2da(ji,jj) * z2da(ji,jj) + z2db(ji,jj) * z2db(ji,jj) )  
    116          END DO 
    117       END DO 
    118       CALL iom_put( "uice_ipa"     , z2da                )       ! ice velocity u component 
    119       CALL iom_put( "vice_ipa"     , z2db                )       ! ice velocity v component 
    120       CALL iom_put( "icevel"       , z2d                 )       ! ice velocity module 
    121       CALL iom_put( "utau_ice"     , utau_ice            )       ! wind stress over ice along i-axis at I-point 
    122       CALL iom_put( "vtau_ice"     , vtau_ice            )       ! wind stress over ice along j-axis at I-point 
    123       CALL iom_put( "snowpre"      , sprecip             )        ! snow precipitation  
    124       CALL iom_put( "micesalt"     , smt_i               )        ! mean ice salinity 
    125       ! 
    126       z2d(:,:) = 0.e0 
    127       DO jl = 1, jpl 
     88      IF ( iom_use( "icethic_cea" ) ) THEN                       ! mean ice thickness 
     89         DO jj = 1, jpj  
     90            DO ji = 1, jpi 
     91               z2d(ji,jj)  = vt_i(ji,jj) / MAX( at_i(ji,jj), epsi06 ) * zind(ji,jj) 
     92            END DO 
     93         END DO 
     94         CALL iom_put( "icethic_cea"  , z2d              ) 
     95      ENDIF 
     96 
     97      IF ( iom_use( "snowthic_cea" ) ) THEN                      ! snow thickness = mean snow thickness over the cell  
     98         DO jj = 1, jpj                                             
     99            DO ji = 1, jpi 
     100               z2d(ji,jj)  = vt_s(ji,jj) / MAX( at_i(ji,jj), epsi06 ) * zind(ji,jj) 
     101            END DO 
     102         END DO 
     103         CALL iom_put( "snowthic_cea" , z2d              )        
     104      ENDIF 
     105      ! 
     106      IF ( iom_use( "uice_ipa" ) .OR. iom_use( "vice_ipa" ) .OR. iom_use( "icevel" ) ) THEN  
     107         DO jj = 2 , jpjm1 
     108            DO ji = 2 , jpim1 
     109               z2da(ji,jj)  = (  u_ice(ji,jj) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) ) * 0.5_wp 
     110               z2db(ji,jj)  = (  v_ice(ji,jj) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) ) * 0.5_wp 
     111           END DO 
     112         END DO 
     113         CALL lbc_lnk( z2da, 'T', -1. ) 
     114         CALL lbc_lnk( z2db, 'T', -1. ) 
     115         CALL iom_put( "uice_ipa"     , z2da                )       ! ice velocity u component 
     116         CALL iom_put( "vice_ipa"     , z2db                )       ! ice velocity v component 
     117         DO jj = 1, jpj                                  
     118            DO ji = 1, jpi 
     119               z2d(ji,jj)  = SQRT( z2da(ji,jj) * z2da(ji,jj) + z2db(ji,jj) * z2db(ji,jj) )  
     120            END DO 
     121         END DO 
     122         CALL iom_put( "icevel"       , z2d                 )       ! ice velocity module 
     123      ENDIF 
     124      ! 
     125      IF ( iom_use( "miceage" ) ) THEN  
     126         z2d(:,:) = 0.e0 
     127         DO jl = 1, jpl 
     128            DO jj = 1, jpj 
     129               DO ji = 1, jpi 
     130                  z2d(ji,jj) = z2d(ji,jj) + zind(ji,jj) * oa_i(ji,jj,jl) 
     131               END DO 
     132            END DO 
     133         END DO 
     134         z1_365 = 1._wp / 365._wp 
     135         CALL iom_put( "miceage"     , z2d * z1_365         )        ! mean ice age 
     136      ENDIF 
     137 
     138      IF ( iom_use( "micet" ) ) THEN  
    128139         DO jj = 1, jpj 
    129140            DO ji = 1, jpi 
    130                z2d(ji,jj) = z2d(ji,jj) + zind(ji,jj) * oa_i(ji,jj,jl) 
    131             END DO 
    132          END DO 
    133       END DO 
    134       z1_365 = 1._wp / 365._wp 
    135       CALL iom_put( "miceage"     , z2d * z1_365         )        ! mean ice age 
    136       DO jj = 1, jpj 
    137          DO ji = 1, jpi 
    138             z2d(ji,jj) = ( tm_i(ji,jj) - rtt ) * zind(ji,jj) 
    139          END DO 
    140       END DO 
    141  
    142       CALL iom_put( "micet"       , z2d                  )        ! mean ice temperature 
    143       CALL iom_put( "icehc"       , et_i                 )        ! ice total heat content 
    144       CALL iom_put( "isnowhc"     , et_s                 )        ! snow total heat content 
    145       ! 
    146       z2d(:,:) = 0.e0 
    147       DO jl = 1, jpl 
     141               z2d(ji,jj) = ( tm_i(ji,jj) - rtt ) * zind(ji,jj) 
     142            END DO 
     143         END DO 
     144         CALL iom_put( "micet"       , z2d                  )        ! mean ice temperature 
     145      ENDIF 
     146      ! 
     147      IF ( iom_use( "icest" ) ) THEN  
     148         z2d(:,:) = 0.e0 
     149         DO jl = 1, jpl 
     150            DO jj = 1, jpj 
     151               DO ji = 1, jpi 
     152                  z2d(ji,jj) = z2d(ji,jj) + zind(ji,jj) * ( t_su(ji,jj,jl) - rtt ) * a_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi06 ) 
     153               END DO 
     154            END DO 
     155         END DO 
     156         CALL iom_put( "icest"       , z2d                 )        ! ice surface temperature 
     157      ENDIF 
     158 
     159      IF ( iom_use( "icecolf" ) ) THEN  
    148160         DO jj = 1, jpj 
    149161            DO ji = 1, jpi 
    150                z2d(ji,jj) = z2d(ji,jj) + zind(ji,jj) * ( t_su(ji,jj,jl) - rtt ) * a_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi06 ) 
    151             END DO 
    152          END DO 
    153       END DO 
    154       CALL iom_put( "icest"       , z2d                 )        ! ice surface temperature 
     162               zindb  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) ) ) 
     163               z2d(ji,jj) = hicol(ji,jj) * zindb 
     164            END DO 
     165         END DO 
     166         CALL iom_put( "icecolf"     , z2d                 )        ! frazil ice collection thickness 
     167      ENDIF 
     168 
     169      CALL iom_put( "isst"        , sst_m               )        ! sea surface temperature 
     170      CALL iom_put( "isss"        , sss_m               )        ! sea surface salinity 
     171      CALL iom_put( "iceconc"     , at_i                )        ! ice concentration 
     172      CALL iom_put( "icevolu"     , vt_i                )        ! ice volume = mean ice thickness over the cell 
     173      CALL iom_put( "icehc"       , et_i                )        ! ice total heat content 
     174      CALL iom_put( "isnowhc"     , et_s                )        ! snow total heat content 
    155175      CALL iom_put( "ibrinv"      , bv_i * 100._wp      )        ! brine volume 
    156       DO jj = 1, jpj 
    157          DO ji = 1, jpi 
    158             zindb  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) ) ) 
    159             z2d(ji,jj) = hicol(ji,jj) * zindb 
    160          END DO 
    161       END DO 
    162       CALL iom_put( "icecolf"     , z2d                 )        ! frazil ice collection thickness 
     176      CALL iom_put( "utau_ice"    , utau_ice            )        ! wind stress over ice along i-axis at I-point 
     177      CALL iom_put( "vtau_ice"    , vtau_ice            )        ! wind stress over ice along j-axis at I-point 
     178      CALL iom_put( "snowpre"     , sprecip             )        ! snow precipitation  
     179      CALL iom_put( "micesalt"    , smt_i               )        ! mean ice salinity 
     180 
    163181      CALL iom_put( "icestr"      , strength * 0.001    )        ! ice strength 
    164182      CALL iom_put( "idive"       , divu_i * 1.0e8      )        ! divergence 
    165183      CALL iom_put( "ishear"      , shear_i * 1.0e8     )        ! shear 
    166184      CALL iom_put( "snowvol"     , vt_s                )        ! snow volume 
    167  
     185       
    168186      CALL iom_put( "icetrp"      , diag_trp_vi * rday  )        ! ice volume transport 
    169187      CALL iom_put( "snwtrp"      , diag_trp_vs * rday  )        ! snw volume transport 
     
    193211      CALL iom_put( "vfxspr"     , wfx_spr * rday / rhoic  )        ! precip (snow)  
    194212 
    195        CALL iom_put ('hfxthd', hfx_thd(:,:) )   !   
    196        CALL iom_put ('hfxdyn', hfx_dyn(:,:) )   !   
    197        CALL iom_put ('hfxres', hfx_res(:,:) )   !   
    198        CALL iom_put ('hfxout', hfx_out(:,:) )   !   
    199        CALL iom_put ('hfxin' , hfx_in(:,:) )   !   
    200        CALL iom_put ('hfxsnw', hfx_snw(:,:) )   !   
    201        CALL iom_put ('hfxsub', hfx_sub(:,:) )   !   
    202        CALL iom_put ('hfxerr', hfx_err(:,:) )   !   
    203        CALL iom_put ('hfxerr_rem', hfx_err_rem(:,:) )   !   
    204  
    205        CALL iom_put ('hfxsum', hfx_sum(:,:) )   !   
    206        CALL iom_put ('hfxbom', hfx_bom(:,:) )   !   
    207        CALL iom_put ('hfxbog', hfx_bog(:,:) )   !   
    208        CALL iom_put ('hfxdif', hfx_dif(:,:) )   !   
    209        CALL iom_put ('hfxopw', hfx_opw(:,:) )   !   
    210        CALL iom_put ('hfxtur', fhtur(:,:) * at_i(:,:) )   ! turbulent heat flux at ice base  
    211        CALL iom_put ('hfxdhc', diag_heat_dhc(:,:) )          ! Heat content variation in snow and ice  
    212        CALL iom_put ('hfxspr', hfx_spr(:,:) )          ! Heat content of snow precip  
    213  
     213      CALL iom_put ('hfxthd', hfx_thd(:,:) )   !   
     214      CALL iom_put ('hfxdyn', hfx_dyn(:,:) )   !   
     215      CALL iom_put ('hfxres', hfx_res(:,:) )   !   
     216      CALL iom_put ('hfxout', hfx_out(:,:) )   !   
     217      CALL iom_put ('hfxin' , hfx_in(:,:) )   !   
     218      CALL iom_put ('hfxsnw', hfx_snw(:,:) )   !   
     219      CALL iom_put ('hfxsub', hfx_sub(:,:) )   !   
     220      CALL iom_put ('hfxerr', hfx_err(:,:) )   !   
     221      CALL iom_put ('hfxerr_rem', hfx_err_rem(:,:) )   !   
     222       
     223      CALL iom_put ('hfxsum', hfx_sum(:,:) )   !   
     224      CALL iom_put ('hfxbom', hfx_bom(:,:) )   !   
     225      CALL iom_put ('hfxbog', hfx_bog(:,:) )   !   
     226      CALL iom_put ('hfxdif', hfx_dif(:,:) )   !   
     227      CALL iom_put ('hfxopw', hfx_opw(:,:) )   !   
     228      CALL iom_put ('hfxtur', fhtur(:,:) * at_i(:,:) )   ! turbulent heat flux at ice base  
     229      CALL iom_put ('hfxdhc', diag_heat_dhc(:,:) )          ! Heat content variation in snow and ice  
     230      CALL iom_put ('hfxspr', hfx_spr(:,:) )          ! Heat content of snow precip  
     231       
    214232      !-------------------------------- 
    215233      ! Output values for each category 
    216234      !-------------------------------- 
    217  
    218          DO jl = 1, jpl  
    219             CALL lbc_lnk( a_i(:,:,jl)  , 'T' ,  1. ) 
    220             CALL lbc_lnk( sm_i(:,:,jl) , 'T' ,  1. ) 
    221             CALL lbc_lnk( oa_i(:,:,jl) , 'T' ,  1. ) 
    222             CALL lbc_lnk( ht_i(:,:,jl) , 'T' ,  1. ) 
    223             CALL lbc_lnk( ht_s(:,:,jl) , 'T' ,  1. ) 
    224          END DO 
    225  
    226          ! Compute ice age 
     235      CALL iom_put( "iceconc_cat"      , a_i         )        ! area for categories 
     236      CALL iom_put( "icethic_cat"      , ht_i        )        ! thickness for categories 
     237      CALL iom_put( "snowthic_cat"     , ht_s        )        ! snow depth for categories 
     238      CALL iom_put( "salinity_cat"     , sm_i        )        ! salinity for categories 
     239 
     240      ! Compute ice age 
     241      IF ( iom_use( "iceage_cat" ) ) THEN  
    227242         DO jl = 1, jpl  
    228243            DO jj = 1, jpj 
     
    233248            END DO 
    234249         END DO 
    235   
    236250         CALL iom_put( "iceage_cat"     , zoi         )        ! ice age for categories 
    237  
    238          ! Compute brine volume 
     251      ENDIF 
     252 
     253      ! Compute brine volume 
     254      IF ( iom_use( "iceage_cat" ) ) THEN  
    239255         zei(:,:,:) = 0._wp 
    240256         DO jl = 1, jpl  
     
    250266            END DO 
    251267         END DO 
    252  
    253          DO jl = 1, jpl  
    254             CALL lbc_lnk( zei(:,:,jl) , 'T' ,  1. ) 
    255          END DO 
    256  
    257          CALL iom_put( "iceconc_cat"      , a_i         )        ! area for categories 
    258          CALL iom_put( "icethic_cat"      , ht_i        )        ! thickness for categories 
    259          CALL iom_put( "snowthic_cat"     , ht_s        )        ! snow depth for categories 
    260          CALL iom_put( "salinity_cat"     , sm_i        )        ! salinity for categories 
    261268         CALL iom_put( "brinevol_cat"     , zei         )        ! brine volume for categories 
    262  
    263          !     !  Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 
    264          !     IF( kindic < 0 )   CALL lim_wri_state( 'output.abort' ) 
    265          !     not yet implemented 
    266  
     269      ENDIF 
     270 
     271      !     !  Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 
     272      !     IF( kindic < 0 )   CALL lim_wri_state( 'output.abort' ) 
     273      !     not yet implemented 
     274       
    267275      CALL wrk_dealloc( jpi, jpj, jpl, zoi, zei ) 
    268276      CALL wrk_dealloc( jpi, jpj     , z2d, zind, z2da, z2db ) 
     
    289297      INTEGER, INTENT( in ) ::   kid , kh_i        
    290298      !!---------------------------------------------------------------------- 
    291      
    292299 
    293300      CALL histdef( kid, "iicethic", "Ice thickness"           , "m"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r4634 r4655  
    4949#endif 
    5050   PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get, iom_gettime, iom_rstput, iom_put 
    51    PUBLIC iom_getatt 
     51   PUBLIC iom_getatt, iom_use 
    5252 
    5353   PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
     
    14461446 
    14471447#endif 
     1448 
     1449   LOGICAL FUNCTION iom_use( cdname ) 
     1450      CHARACTER(LEN=*), INTENT(in) ::   cdname 
     1451#if defined key_iomput 
     1452      iom_use = xios_field_is_active( cdname ) 
     1453#else 
     1454      iom_use = .FALSE. 
     1455#endif 
     1456   END FUNCTION iom_use 
    14481457    
    14491458   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.