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 900 for trunk/NEMO/C1D_SRC/diawri_c1d.F90 – NEMO

Ignore:
Timestamp:
2008-04-22T20:13:41+02:00 (16 years ago)
Author:
rblod
Message:

Update 1D configuration according to SBC and LIM3, see ticket #117

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/C1D_SRC/diawri_c1d.F90

    r899 r900  
    1 MODULE diawri1d 
     1MODULE diawri_c1d 
    22   !!====================================================================== 
    3    !!                     ***  MODULE  diawri1d  *** 
     3   !!                     ***  MODULE  diawri_c1d  *** 
    44   !! Ocean diagnostics :  write ocean output files 
    55   !!===================================================================== 
     6   !! History :   2.0  !  2004-10  (C. Ethe)  1D Configuration 
     7   !!             3.0  !  2008-04  (G. Madec)  adaptation to SBC 
     8   !!---------------------------------------------------------------------- 
    69#if defined key_c1d 
    710   !!---------------------------------------------------------------------- 
    8    !!   'key_c1d'               1D Configuration 
     11   !!   'key_c1d'                                          1D Configuration 
    912   !!----------------------------------------------------------------------   
    10    !!---------------------------------------------------------------------- 
    11    !! * Modules used 
     13   !!   dia_wri_c1d       : create the standart NetCDF output files 
     14   !!---------------------------------------------------------------------- 
    1215   USE oce             ! ocean dynamics and tracers  
    1316   USE dom_oce         ! ocean space and time domain 
     
    1518   USE sbc_oce         ! surface boundary condition: ocean 
    1619   USE sbc_ice         ! surface boundary condition: ice 
     20   USE sbcmod          ! surface Boundary Codition 
     21   USE sbcssr          ! surface boundary condition: restauring to SSS and or SST 
    1722   USE zdftke          ! TKE vertical mixing 
    1823   USE zdfkpp          ! KPP vertical mixing 
     
    2631   USE diawri 
    2732   USE zdfddm          ! vertical  physics: double diffusion 
    28    USE diahth          ! thermocline diagnostics 
    2933   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    3034   USE in_out_manager  ! I/O manager 
     35   USE ioipsl 
    3136 
    3237   IMPLICIT NONE 
    3338   PRIVATE 
    3439 
    35    !! * Accessibility 
    36    PUBLIC dia_wri_1d                 ! routines called by step.F90 
    37    !! * Module variables 
    38    INTEGER ::   & 
    39       nid_T, nz_T, nh_T, ndim_T, ndim_hT,      &   ! grid_T file 
    40       ndex(1)                                      ! ??? 
    41    INTEGER, DIMENSION(jpi*jpj) ::   & 
    42       ndex_hT 
    43    INTEGER, DIMENSION(jpi*jpj*jpk) ::   & 
    44       ndex_T 
     40   PUBLIC dia_wri_c1d                 ! routines called by step.F90 
     41 
     42   INTEGER ::   nid_T, nz_T, nh_T, ndim_T, ndim_hT, ndex(1)   ! grid_T file 
     43   INTEGER, DIMENSION(jpi*jpj)     ::   ndex_hT 
     44   INTEGER, DIMENSION(jpi*jpj*jpk) ::   ndex_T 
    4545 
    4646   !! * Substitutions 
    4747#  include "zdfddm_substitute.h90" 
    4848   !!---------------------------------------------------------------------- 
    49    !!   OPA 9.0 , LOCEAN-IPSL  (2005) 
     49   !! NEMO/C1D 3.0 , LOCEAN-IPSL  (2008) 
    5050   !! $Id$ 
    51    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
     51   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    5252   !!---------------------------------------------------------------------- 
    5353 
    5454CONTAINS 
    55    !!---------------------------------------------------------------------- 
    56    !!   Default option                                   NetCDF output file 
    57    !!---------------------------------------------------------------------- 
    58    !!   dia_wri_1d       : create the standart NetCDF output files 
    59    !!   dia_wri_state_1d : create an output NetCDF file for a single 
    60    !!                      instantaeous ocean state and forcing fields 
    61    !!---------------------------------------------------------------------- 
    62  
    63    SUBROUTINE dia_wri_1d( kt, kindic ) 
     55 
     56   SUBROUTINE dia_wri_c1d( kt, kindic ) 
    6457      !!--------------------------------------------------------------------- 
    65       !!                  ***  ROUTINE dia_wri_1d  *** 
     58      !!                  ***  ROUTINE dia_wri_c1d  *** 
    6659      !!                    
    6760      !! ** Purpose :   Standard output of opa: dynamics and tracer fields  
     
    7568      !!      IF kindic =0, time step loop 
    7669      !!      IF kindic >0, output of fields before the time step loop 
    77       !! 
    78       !! History : 
    79       !!        !  91-03  (M.-A. Foujols)  Original code 
    80       !!        !  91-11  (G. Madec) 
    81       !!        !  92-06  (M. Imbard)  correction restart file 
    82       !!        !  92-07  (M. Imbard)  split into diawri and rstwri 
    83       !!        !  93-03  (M. Imbard)  suppress writibm 
    84       !!        !  98-01  (C. Levy)  NETCDF format using ioipsl INTERFACE 
    85       !!        !  99-02  (E. Guilyardi)  name of netCDF files + variables 
    86       !!   8.5  !  02-09  (G. Madec)  F90: Free form and module 
    87       !!   9.0  !  04-10  (C. Ethe)   1D Configuration 
    88       !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    8970      !!---------------------------------------------------------------------- 
    90       !! * Modules used 
    91       USE ioipsl 
    92  
    93       !! * Arguments 
    9471      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    9572      INTEGER, INTENT( in ) ::   kindic  !  
    96  
    97       !! * Local declarations 
    98       LOGICAL ::   ll_print = .FALSE.    ! =T print and flush numout 
    99       CHARACTER (len=40) ::           & 
    100          clhstnam, clop, clmx            ! temporary names 
    101       INTEGER ::   inum = 11             ! temporary logical unit 
    102       INTEGER ::   & 
    103          ji, jj, ik                      ! dummy loop indices 
    104       INTEGER ::   & 
    105          iimi, iima, ipk, it,         &  ! temporary integers 
    106          ijmi, ijma                      !    "          " 
    107       REAL(wp) ::   & 
    108          zsto, zout, zmax,            &  ! temporary scalars 
    109          zjulian, zdt                    !    "         " 
    110       REAL(wp), DIMENSION(jpi,jpj) :: & 
    111          zw2d                            ! temporary workspace 
     73      !! 
     74      LOGICAL ::   ll_print = .FALSE.                ! =T print and flush numout 
     75      CHARACTER (len=40) ::   clhstnam, clop, clmx   ! temporary names 
     76      INTEGER ::   inum = 11                         ! temporary logical unit 
     77      INTEGER ::   ji, jj, ik                        ! dummy loop indices 
     78      INTEGER ::   iimi, iima, ipk, it, ijmi, ijma   ! temporary integers 
     79      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt   ! temporary scalars 
     80      REAL(wp), DIMENSION(jpi,jpj) ::   zw2d         ! temporary workspace 
    11281      !!---------------------------------------------------------------------- 
    11382       
     
    146115      ! ----------------------------------------------------------------- 
    147116 
    148       IF(ll_print) WRITE(numout,*) 'dia_wri_1d kt = ', kt, ' kindic ', kindic 
     117      IF(ll_print) WRITE(numout,*) 'dia_wri_c1d kt = ', kt, ' kindic ', kindic 
    149118 
    150119      IF( kt == nit000 ) THEN 
     
    192161         CALL histdef( nid_T, "sosaline", "Sea Surface Salinity"               , "PSU"    ,   &  ! sss 
    193162            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    194  
    195 !!$#if ! defined key_dynspg_rl && ( defined key_lim2 || defined key_lim2 ) 
    196 !!$         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
    197 !!$         !    internal damping to Levitus that can be diagnosed from others 
    198 !!$         ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 
    199 !!$         CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater"          , "kg/m2/s",   &  ! fsalt 
    200 !!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    201 !!$         CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater"        , "kg/m2/s",   &  ! fmass 
    202 !!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    203 !!$#endif 
    204163         CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! emp 
    205164            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    206          CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
    207             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     165!!       CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
     166!!          &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    208167         CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! emps 
    209168            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    228187         CALL histdef( nid_T, "soicecov", "Ice Cover"                          , "[0,1]"  ,   &  ! freeze 
    229188            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    230 #if ! defined key_coupled  
    231          CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    232             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    233          CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
    234             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    235          CALL histdef( nid_T, "sosafldp", "Surface salt flux: damping"         , "Kg/m2/s",   &  ! erp * sn 
    236             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    237 #endif 
    238  
    239 #if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) )  
    240          CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    241             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    242          CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
    243             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    244          CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping"         , "Kg/m2/s",   &  ! erp * sn 
    245             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    246 #endif 
     189         IF( ln_ssr ) THEN 
     190            CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
     191               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     192            CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
     193               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     194            CALL histdef( nid_T, "sosafldp", "Surface salt flux: damping"         , "Kg/m2/s",   &  ! erp * sn 
     195               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     196         ENDIF 
    247197         clmx ="l_max(only(x))"    ! max index on a period 
    248198         CALL histdef( nid_T, "sobowlin", "Bowl Index"                         , "W-point",   &  ! bowl INDEX  
    249199            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clmx, zsto, zout ) 
    250 #if defined key_diahth 
    251          CALL histdef( nid_T, "sothedep", "Thermocline Depth"                  , "m"      ,   & ! hth 
    252             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    253          CALL histdef( nid_T, "so20chgt", "Depth of 20C isotherm"              , "m"      ,   & ! hd20 
    254             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    255          CALL histdef( nid_T, "so28chgt", "Depth of 28C isotherm"              , "m"      ,   & ! hd28 
    256             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    257          CALL histdef( nid_T, "sohtc300", "Heat content 300 m"                 , "W"      ,   & ! htc3 
    258             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    259 #endif 
    260  
    261 #if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled 
    262          CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature"            , "K"      ,   &  ! tn_ice 
    263             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    264          CALL histdef( nid_T,"soicealb" , "Ice Albedo"                         , "[0,1]"  ,   &  ! alb_ice 
    265             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    266 #endif  
    267  
    268200         !                                                                                      !!! nid_U : 3D 
    269201         CALL histdef( nid_T, "vozocrtx", "Zonal Current"                      , "m/s"    ,   &  ! un 
     
    288220            &          jpi, jpj, nh_T, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
    289221#if defined key_zdftke 
    290          !                                                                                      !!! nid_W : 3D 
    291222         CALL histdef( nid_T, "votlsdis", " Dissipation Turbulent Lenght Scale", "m"      ,   &  ! e_dis 
    292223            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    293          ! 
    294224         CALL histdef( nid_T, "votlsmix", " Mixing Turbulent Lenght Scale"     , "m"      ,   &  ! e_mix 
    295225            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    296          ! 
    297226         CALL histdef( nid_T, "votlspdl", " Prandl Number",                      "-"       ,   &  ! e_pdl 
    298227            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    299          ! 
    300228         CALL histdef( nid_T, "votlsric", " Local Richardson Number",            "-"       ,   &  ! e_ric 
    301229            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    302          ! 
    303230         CALL histdef( nid_T, "votkeend", "TKE: Turbulent kinetic energy"       , "m2/s"   ,   &  ! TKE 
    304231            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    305232#endif 
    306233#if defined key_zdfkpp 
    307          !                                                                                      !!! nid_W : 3D 
    308234         CALL histdef( nid_T, "vokpprig", " Gradient Richardson Number"        ,  "-"      ,   &  ! rig 
    309235            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    310          ! 
    311236         CALL histdef( nid_T, "vokpprib", " Bulk Richardson Number    "        ,  "-"      ,   &   ! rib 
    312237            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    313          ! 
    314238         CALL histdef( nid_T, "vokppbsf", " Buoyancy forcing          "        , "N/m2"    ,   &  ! sokppbsf 
    315239            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    316          ! 
    317240         CALL histdef( nid_T, "vokppmol", "Moning Obukhov length scale     "   , "m"       ,   &  ! sokppmol 
    318241            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
     
    321244         CALL histdef( nid_T, "voeosbn2", "Brunt-Vaisala Frequency"             , "m2/s2"  ,   &  ! rn2 
    322245            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    323  
    324246         CALL histdef( nid_T, "votkeavt", "Vertical Eddy Diffusivity"          , "m2/s"   ,   &  ! avt 
    325247            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    326  
    327248         CALL histdef( nid_T, "votkeevd", "Enhanced Vertical Diffusivity",       "m2/s"   ,   &  ! avt_evd 
    328249            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    329  
    330250         CALL histdef( nid_T, "votkeavm", "Vertical Eddy Viscosity",             "m2/s"   ,   &  ! avmu 
    331251            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
     
    333253         CALL histdef( nid_T, "votkeevm", "Enhanced Vertical Viscosity",         "m2/s"   ,   &  ! avmu_evd 
    334254            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    335  
    336255         IF( lk_zdfddm ) THEN 
    337256            CALL histdef( nid_T,"voddmavs","Salt Vertical Eddy Diffusivity"    , "m2/s"   ,   &  ! avs 
     
    364283      CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature 
    365284      CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity 
    366 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 
    367       CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
    368       CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
    369 #endif 
    370285      CALL histwrite( nid_T, "sowaflup", it, emp           , ndim_hT, ndex_hT )   ! upward water flux 
    371       CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
     286!!    CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    372287      CALL histwrite( nid_T, "sowaflcd", it, emps          , ndim_hT, ndex_hT )   ! c/d water flux 
    373288      zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 
     
    390305      CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth 
    391306      CALL histwrite( nid_T, "soicecov", it, freeze        , ndim_hT, ndex_hT )   ! ice cover  
    392 #if ! defined key_coupled 
    393       CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    394       CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    395       zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
    396       CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    397 #endif 
    398 #if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) )  
    399       CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    400       CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
     307      IF( ln_ssr ) THEN 
     308         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
     309         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    401310         zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
    402       CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    403 #endif 
    404          zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 
     311         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
     312      ENDIF 
     313      zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 
    405314      CALL histwrite( nid_T, "sobowlin", it, zw2d          , ndim_hT, ndex_hT )   ! ??? 
    406  
    407 #if defined key_diahth 
    408       CALL histwrite( nid_T, "sothedep", it, hth           , ndim_hT, ndex_hT )   ! depth of the thermocline 
    409       CALL histwrite( nid_T, "so20chgt", it, hd20          , ndim_hT, ndex_hT )   ! depth of the 20 isotherm 
    410       CALL histwrite( nid_T, "so28chgt", it, hd28          , ndim_hT, ndex_hT )   ! depth of the 28 isotherm 
    411       CALL histwrite( nid_T, "sohtc300", it, htc3          , ndim_hT, ndex_hT )   ! first 300m heaat content 
    412 #endif 
    413 #if ( defined key_lim3 || defined key_lim2 ) &&  defined key_coupled  
    414       CALL histwrite( nid_T, "soicetem", it, tn_ice        , ndim_hT, ndex_hT )   ! surf. ice temperature 
    415       CALL histwrite( nid_T, "soicealb", it, alb_ice       , ndim_hT, ndex_hT )   ! ice albedo 
    416 #endif 
    417  
    418315      CALL histwrite( nid_T, "vozocrtx", it, un            , ndim_T , ndex_T )    ! i-current 
    419316      CALL histwrite( nid_T, "sozotaux", it, utau          , ndim_hT, ndex_hT )   ! i-wind stress 
     
    444341      ! 3. Synchronise and close all files 
    445342      ! --------------------------------------- 
    446       IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0 ) THEN 
    447          CALL histsync( nid_T ) 
    448       ENDIF 
     343      IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0 )   CALL histsync( nid_T ) 
    449344 
    450345      !  Create an output files (output.abort.nc) if S < 0 or u > 20 m/s 
    451346      IF( kindic < 0 )   CALL dia_wri_state( 'output.abort' ) 
    452347 
    453       IF( kt == nitend .OR. kindic < 0 ) THEN 
    454          CALL histclo( nid_T ) 
    455       ENDIF 
    456  
    457    END SUBROUTINE dia_wri_1d 
     348      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nid_T ) 
     349      ! 
     350   END SUBROUTINE dia_wri_c1d 
     351 
    458352#else 
    459353   !!---------------------------------------------------------------------- 
    460    !!   Default key                                     NO 1D Config 
     354   !!   Default key                                     NO 1D Configuration 
    461355   !!---------------------------------------------------------------------- 
    462356CONTAINS 
    463    SUBROUTINE dia_wri_1d ( kt, kindic ) 
    464       WRITE(*,*) 'dia_wri_1d: You should not have seen this print! error?', kt, kindic 
    465    END SUBROUTINE dia_wri_1d 
     357   SUBROUTINE dia_wri_c1d ( kt, kindic )      ! dummy routine 
     358      WRITE(*,*) 'dia_wri_c1d: You should not have seen this print! error?', kt, kindic 
     359   END SUBROUTINE dia_wri_c1d 
    466360#endif 
    467361 
    468362   !!====================================================================== 
    469 END MODULE diawri1d 
     363END MODULE diawri_c1d 
Note: See TracChangeset for help on using the changeset viewer.