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 1482 for trunk/NEMO/LIM_SRC_2/limwri_2.F90 – NEMO

Ignore:
Timestamp:
2009-07-03T17:28:06+02:00 (15 years ago)
Author:
smasson
Message:

distribution of iom_put + cleaning of LIM2 outputs, see ticket:437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC_2/limwri_2.F90

    r1470 r1482  
    44   !!         Ice diagnostics :  write ice output files 
    55   !!====================================================================== 
    6    !! history :  2.0  ! 03-08  (C. Ethe) original code 
    7    !!            2.0  ! 04-10  (C. Ethe )  1D configuration 
     6   !! history :  2.0  ! 2003-08  (C. Ethe)      original code 
     7   !!            2.0  ! 2004-10  (C. Ethe )     1D configuration 
     8   !!             -   ! 2009-06  (B. Lemaire )  iom_put + lim_wri_state_2 
    89   !!------------------------------------------------------------------- 
    910#if defined key_lim2 
     
    1415   !!   lim_wri_2      : write of the diagnostics variables in ouput file  
    1516   !!   lim_wri_init_2 : initialization and namelist read 
     17   !!   lim_wri_state_2 : write for initial state or/and abandon: 
     18   !!                     > output.init.nc (if ninist = 1 in namelist) 
     19   !!                     > output.abort.nc 
    1620   !!---------------------------------------------------------------------- 
    1721   USE phycst 
     
    3236   PRIVATE 
    3337 
    34    PUBLIC   lim_wri_2      ! routine called by sbc_ice_lim_2 
     38#if ! defined key_iomput 
     39   PUBLIC   lim_wri_2         ! called by sbc_ice_lim_2 
     40#endif 
     41   PUBLIC   lim_wri_state_2   ! called by dia_wri_state  
    3542 
    3643   INTEGER, PARAMETER                       ::   jpnoumax = 40   ! maximum number of variable for ice output 
     
    6168CONTAINS 
    6269 
    63 #if defined key_dimgout 
     70#if ! defined key_iomput 
     71# if defined key_dimgout 
    6472   !!---------------------------------------------------------------------- 
    6573   !!   'key_dimgout'                                    Direct Access file 
    6674   !!---------------------------------------------------------------------- 
    6775# include "limwri_dimg_2.h90" 
    68 #else 
    69    !!---------------------------------------------------------------------- 
    70    !!   Default option                                          NetCDF file 
    71    !!---------------------------------------------------------------------- 
    72  
     76# else 
    7377   SUBROUTINE lim_wri_2( kt ) 
    7478      !!------------------------------------------------------------------- 
     
    9296      REAL(wp), DIMENSION(jpi,jpj,jpnoumax) ::   zcmo 
    9397      !!------------------------------------------------------------------- 
    94  
    95       CALL iom_setkt( kt + nn_fsbc - 1 ) 
    96       !                                          !--------------------! 
     98                                                 !--------------------! 
    9799      IF( kt == nit000 ) THEN                    !   Initialisation   ! 
    98100         !                                       !--------------------! 
     
    180182          
    181183         IF( nc(jf) == 1 )   CALL histwrite( nice, nam(jf), niter, zfield, ndim, ndex51 ) 
    182          CALL iom_put( nam(jf), zfield ) 
    183184          
    184185      END DO 
    185186       
    186187      IF( ( nn_fsbc * niter ) >= nitend )   CALL histclo( nice )  
    187       ! 
    188       CALL iom_setkt( kt ) 
    189188 
    190189   END SUBROUTINE lim_wri_2 
    191     
    192 #endif 
    193     
     190      
     191 
    194192   SUBROUTINE lim_wri_init_2 
    195193      !!------------------------------------------------------------------- 
     
    273271   END SUBROUTINE lim_wri_init_2 
    274272 
     273# endif 
     274#endif 
     275 
     276   SUBROUTINE lim_wri_state_2( kt, kid, kh_i ) 
     277      !!--------------------------------------------------------------------- 
     278      !!                 ***  ROUTINE lim_wri_state_2  *** 
     279      !!         
     280      !! ** Purpose :   create a NetCDF file named cdfile_name which contains  
     281      !!      the instantaneous ice state and forcing fields for ice model 
     282      !!        Used to find errors in the initial state or save the last 
     283      !!      ocean state in case of abnormal end of a simulation 
     284      !! 
     285      !! History : 
     286      !!   2.0  !  2009-06  (B. Lemaire) 
     287      !!---------------------------------------------------------------------- 
     288      INTEGER, INTENT( in ) ::   kt               ! ocean time-step index) 
     289      INTEGER, INTENT( in ) ::   kid , kh_i        
     290      !!---------------------------------------------------------------------- 
     291 
     292      CALL histdef( kid, "isnowthi", "Snow thickness"          , "m"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     293      CALL histdef( kid, "iicethic", "Ice thickness"           , "m"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     294      CALL histdef( kid, "iiceprod", "Ice produced"            , "m/kt"   , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     295      CALL histdef( kid, "ileadfra", "Ice concentration"       , "-"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     296      CALL histdef( kid, "iicetemp", "Ice temperature"         , "K"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     297      CALL histdef( kid, "ioceflxb", "flux at ice base"        , "w/m2"   , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     298      CALL histdef( kid, "iicevelu", "i-Ice speed (I-point)"   , "m/s"    , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     299      CALL histdef( kid, "iicevelv", "j-Ice speed (I-point)"   , "m/s"    , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     300      CALL histdef( kid, "isstempe", "Sea surface temperature" , "C"      , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     301      CALL histdef( kid, "isssalin", "Sea surface salinity"    , "PSU"    , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     302      CALL histdef( kid, "iicestru", "i-Wind stress over ice (I-pt)", "Pa", jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     303      CALL histdef( kid, "iicestrv", "j-Wind stress over ice (I-pt)", "Pa", jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     304      CALL histdef( kid, "iicesflx", "Solar flux over ice"     , "w/m2"   , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     305      CALL histdef( kid, "iicenflx", "Non-solar flux over ice" , "w/m2"   , jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt ) 
     306      CALL histdef( kid, "isnowpre", "Snow precipitation"      , "kg/m2/s", jpi, jpj, kh_i, 1, 1, 1, -99, 32, "inst(x)", rdt, rdt )  
     307 
     308      CALL histend( kid )   ! end of the file definition 
     309 
     310      CALL histwrite( kid, "isnowthi", kt, hsnif          , jpi*jpj, (/1/) )    
     311      CALL histwrite( kid, "iicethic", kt, hicif          , jpi*jpj, (/1/) )     
     312      CALL histwrite( kid, "iiceprod", kt, hicifp         , jpi*jpj, (/1/) )    
     313      CALL histwrite( kid, "ileadfra", kt, 1. - frld(:,:) , jpi*jpj, (/1/) ) 
     314      CALL histwrite( kid, "iicetemp", kt, sist(:,:) - rt0, jpi*jpj, (/1/) ) 
     315      CALL histwrite( kid, "ioceflxb", kt, fbif           , jpi*jpj, (/1/) ) 
     316      CALL histwrite( kid, "iicevelv", kt, u_ice          , jpi*jpj, (/1/) ) 
     317      CALL histwrite( kid, "iicevelu", kt, v_ice          , jpi*jpj, (/1/) ) 
     318      CALL histwrite( kid, "isstempe", kt, sst_m          , jpi*jpj, (/1/) ) 
     319      CALL histwrite( kid, "isssalin", kt, sss_m          , jpi*jpj, (/1/) ) 
     320      CALL histwrite( kid, "iicestru", kt, utau_ice       , jpi*jpj, (/1/) ) 
     321      CALL histwrite( kid, "iicestrv", kt, vtau_ice       , jpi*jpj, (/1/) ) 
     322      CALL histwrite( kid, "iicesflx", kt, qsr_ice(:,:,1) , jpi*jpj, (/1/) ) 
     323      CALL histwrite( kid, "iicenflx", kt, qns_ice(:,:,1) , jpi*jpj, (/1/) ) 
     324      CALL histwrite( kid, "isnowpre", kt, sprecip        , jpi*jpj, (/1/) ) 
     325 
     326    END SUBROUTINE lim_wri_state_2 
     327 
    275328#else 
    276329   !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.