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/OPA_SRC/DIA/diawri.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/OPA_SRC/DIA/diawri.F90

    r1465 r1482  
    2828   USE iom 
    2929   USE ioipsl 
    30  
     30#if defined key_lim2 
     31   USE limwri_2  
     32#endif 
    3133   IMPLICIT NONE 
    3234   PRIVATE 
     
    7274   !!                   instantaeous ocean state and forcing fields 
    7375   !!---------------------------------------------------------------------- 
    74  
     76# if defined key_iomput 
     77   SUBROUTINE dia_wri( kt, kindic ) 
     78      !!--------------------------------------------------------------------- 
     79      !!                  ***  ROUTINE dia_wri  *** 
     80      !!                    
     81      !! ** Purpose :   Standard output of opa: dynamics and tracer fields  
     82      !!      NETCDF format is used by default  
     83      !! 
     84      !! ** Method  :  use iom_put 
     85      !! 
     86      !! History : 
     87      !!   3.2  !  05-11  (B. Lemaire) creation from old diawri 
     88      !!---------------------------------------------------------------------- 
     89      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
     90      INTEGER, INTENT( in ) ::   kindic  !  
     91      !!---------------------------------------------------------------------- 
     92      !  
     93      ! Output the initial state and forcings 
     94      IF( ninist == 1 ) THEN                        
     95         CALL dia_wri_state( 'output.init', kt ) 
     96         ninist = 0 
     97      ENDIF 
     98 
     99      CALL iom_put( "toce"   , tn        )    ! temperature 
     100      CALL iom_put( "soce"   , sn        )    ! salinity 
     101      CALL iom_put( "sst"    , tn(:,:,1) )    ! sea surface temperature 
     102      CALL iom_put( "sss"    , sn(:,:,1) )    ! sea surface salinity 
     103      CALL iom_put( "uoce"   , un        )    ! i-current       
     104      CALL iom_put( "voce"   , vn        )    ! j-current 
     105       
     106      CALL iom_put( "avt"    , avt       )    ! T vert. eddy diff. coef. 
     107      CALL iom_put( "avm"    , avmu      )    ! T vert. eddy visc. coef. 
     108      IF( lk_zdfddm ) THEN 
     109         CALL iom_put( "avs", fsavs(:,:,:) )    ! S vert. eddy diff. coef. 
     110      ENDIF 
     111 
     112   END SUBROUTINE dia_wri 
     113 
     114#else 
    75115   SUBROUTINE dia_wri( kt, kindic ) 
    76116      !!--------------------------------------------------------------------- 
     
    118158      CHARACTER (len=80) :: clname 
    119159      !!---------------------------------------------------------------------- 
    120  
     160      ! 
     161      ! Output the initial state and forcings 
     162      IF( ninist == 1 ) THEN                        
     163         CALL dia_wri_state( 'output.init', kt ) 
     164         ninist = 0 
     165      ENDIF 
     166      ! 
    121167      ! 0. Initialisation 
    122168      ! ----------------- 
     
    417463         WRITE(numout,*) '~~~~~~ ' 
    418464      ENDIF 
    419        
    420 !--------------------------------------------------------------------------- 
    421  
    422       CALL iom_put("votemper",tn) 
    423       CALL iom_put("vosaline",sn) 
    424       CALL iom_put("sosstsst",tn(:,:,1))   ! sea surface temperature 
    425       CALL iom_put("sosaline",sn(:,:,1))   ! sea surface salinity 
    426 #if defined key_dynspg_rl 
    427       CALL iom_put("sobarstf",bsfn)   ! barotropic streamfunction 
    428 #else 
    429       CALL iom_put("sossheig",sshn)   ! sea surface height 
    430 #endif 
    431  
    432       CALL iom_put("sowaflup",emp )   ! upward water flux 
    433       CALL iom_put("sowaflcd",emps)   ! c/d water flux 
    434       zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 
    435       CALL iom_put("sosalflx",zw2d)   ! c/d salt flux 
    436       CALL iom_put("sohefldo",qns + qsr )   ! total heat flux 
    437       CALL iom_put("soshfldo",qsr)   ! solar heat flux 
    438       CALL iom_put("somxl010",hmlp)   ! mixed layer depth 
    439       CALL iom_put("somixhgt",hmld)   ! turbocline depth 
    440       CALL iom_put("soicecov",fr_i)   ! ice fraction  
    441 #if ! defined key_coupled 
    442       CALL iom_put("sohefldp",qrp)   ! heat flux damping 
    443       CALL iom_put("sowafldp",erp)   ! freshwater flux damping 
    444       zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
    445       CALL iom_put("sosafldp", zw2d)   ! salt flux damping 
    446 #endif 
    447  
    448 #if ( defined key_coupled && ! defined key_lim3 && ! defined key_lim2 )  
    449       CALL iom_put("sohefldp",qrp)   ! heat flux damping 
    450       CALL iom_put("sowafldp",erp)   ! freshwater flux damping 
    451          zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
    452       CALL iom_put("sosafldp",zw2d)   ! salt flux damping 
    453 #endif 
    454 #if defined key_diaspr 
    455       CALL iom_put("sosurfps",gps)   ! surface pressure 
    456 #endif 
    457          zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 
    458       CALL iom_put("sobowlin",zw2d)   ! ??? 
    459  
    460 #if defined key_diahth 
    461       CALL iom_put("sothedep",hth)   ! depth of the thermocline 
    462       CALL iom_put("so20chgt",hd20)   ! depth of the 20 isotherm 
    463       CALL iom_put("so28chgt",hd28)   ! depth of the 28 isotherm 
    464       CALL iom_put("sohtc300",htc3)   ! first 300m heaat content 
    465 #endif 
    466  
    467 #if defined key_coupled  
    468 #  if defined key_lim3 
    469       Must be adapted for LIM3 
    470 #  else 
    471       CALL iom_put("soicetem",tn_ice)   ! surf. ice temperature 
    472       CALL iom_put("soicealb",alb_ice)   ! ice albedo 
    473 #  endif 
    474 #endif 
    475          ! Write fields on U grid 
    476       CALL iom_put("vozocrtx",un)    ! i-current 
    477 #if defined key_diaeiv 
    478       CALL iom_put("vozoeivu",u_eiv)    ! i-eiv current 
    479 #endif 
    480       CALL iom_put("sozotaux",utau)   ! i-wind stress 
    481 #if defined key_dynspg_rl 
    482       CALL lbc_lnk( spgu, 'U', -1. ) 
    483       CALL iom_put("sozospgx",spgu)   ! i-surf. press. grad. 
    484 #endif 
    485  
    486          ! Write fields on V grid 
    487       CALL iom_put("vomecrty",vn)   ! j-current 
    488 #if defined key_diaeiv 
    489       CALL iom_put("vomeeivv",v_eiv)   ! j-eiv current 
    490 #endif 
    491       CALL iom_put("sometauy", vtau)   ! j-wind stress 
    492 #if defined key_dynspg_rl 
    493       CALL lbc_lnk( spgv, 'V', -1. ) 
    494       CALL iom_put("somespgy",spgv)   ! j-surf. pressure grad. 
    495 #endif 
    496  
    497          ! Write fields on W grid 
    498       CALL iom_put("vovecrtz",wn)    ! vert. current 
    499 #   if defined key_diaeiv 
    500       CALL iom_put("voveeivw",w_eiv)    ! vert. eiv current 
    501 #   endif 
    502       CALL iom_put("votkeavt",avt)    ! T vert. eddy diff. coef. 
    503       CALL iom_put("votkeevd",avt_evd)    ! T enhan. vert. eddy diff. coef. 
    504       CALL iom_put("votkeavm",avmu)    ! T vert. eddy visc. coef. 
    505       CALL iom_put("votkeevm",avmu_evd)    ! T enhan. vert. eddy visc. coef. 
    506 #   if defined key_zdftmx 
    507       CALL iom_put("votidavt",av_tide)    ! vert. mix. related to internal tides 
    508       CALL iom_put("voitfavt",av_tide_itf)    ! ITF vert. mix. related to internal tides 
    509 #   endif 
    510       IF( lk_zdfddm ) THEN 
    511          CALL iom_put("voddmavs",fsavs(:,:,:) )    ! S vert. eddy diff. coef. 
    512       ENDIF 
    513 #if defined key_traldf_c2d 
    514       CALL iom_put("soleahtw",ahtw)   ! lateral eddy diff. coef. 
    515 # if defined key_traldf_eiv 
    516       CALL iom_put("soleaeiw",aeiw)   ! EIV coefficient at w-point 
    517 # endif 
    518 #endif 
    519 !--------------------------------------------------------------------------- 
    520465 
    521466      ! Write fields on T grid 
     
    623568#endif 
    624569 
    625       !  Create an output files (output.abort.nc) if S < 0 or u > 20 m/s 
    626       IF( kindic < 0 )   CALL dia_wri_state( 'output.abort', kt ) 
    627  
    628570      ! 3. Close all files 
    629571      ! --------------------------------------- 
     
    636578 
    637579   END SUBROUTINE dia_wri 
    638  
     580# endif 
    639581 
    640582   SUBROUTINE dia_wri_state( cdfile_name, kt ) 
     
    736678         &          jpi, jpj, nh_i, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    737679 
     680#if defined key_lim2 
     681      CALL lim_wri_state_2( kt, id_i, nh_i ) 
     682#else 
    738683      CALL histend( id_i ) 
     684#endif 
    739685 
    740686      ! 2. Start writing data 
Note: See TracChangeset for help on using the changeset viewer.