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 888 for trunk/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2008-04-11T19:05:03+02:00 (16 years ago)
Author:
ctlod
Message:

merge dev_001_SBC branche with the trunk to include the New Surface Module package, see ticket: #113

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DIA/diawri.F90

    r833 r888  
    1414   USE sol_oce         ! solver variables 
    1515   USE ice_oce         ! ice variables 
     16   USE sbc_oce         ! Surface boundary condition: ocean fields 
     17   USE sbc_ice         ! Surface boundary condition: ice fields 
     18   USE sbcssr          ! restoring term toward SST/SSS climatology 
    1619   USE phycst          ! physical constants 
    1720   USE ocfzpt          ! ocean freezing point 
    18    USE ocesbc          ! surface thermohaline fluxes 
    19    USE taumod          ! surface stress 
    20    USE flxrnf          ! ocean runoffs 
    2121   USE zdfmxl          ! mixed layer 
    2222   USE daymod          ! calendar 
     
    2727   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2828   USE in_out_manager  ! I/O manager 
    29    USE flx_oce         ! sea-ice/ocean forcings variables 
    3029   USE diadimg         ! dimg direct access file format output 
    3130   USE ioipsl 
     
    5453   !!---------------------------------------------------------------------- 
    5554   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    56    !! $Header$  
     55   !! $Id$ 
    5756   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    5857   !!---------------------------------------------------------------------- 
     
    245244            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    246245#endif 
    247 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 
    248          ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
    249          !    internal damping to Levitus that can be diagnosed from others 
    250          ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 
    251          CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater"          , "kg/m2/s",   &  ! fsalt 
    252             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    253          CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater"        , "kg/m2/s",   &  ! fmass 
    254             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    255 #endif 
     246!!$#if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 
     247!!$         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
     248!!$         !    internal damping to Levitus that can be diagnosed from others 
     249!!$         ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 
     250!!$         CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater"          , "kg/m2/s",   &  ! fsalt 
     251!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     252!!$         CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater"        , "kg/m2/s",   &  ! fmass 
     253!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     254!!$#endif 
    256255         CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! emp 
    257256            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    258          CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
    259             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     257!!$         CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs 
     258!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    260259         CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! emps 
    261260            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    262261         CALL histdef( nid_T, "sosalflx", "Surface Salt Flux"                  , "Kg/m2/s",   &  ! emps * sn 
    263262            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    264          CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qt 
     263         CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qns + qsr 
    265264            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    266265         CALL histdef( nid_T, "soshfldo", "Shortwave Radiation"                , "W/m2"   ,   &  ! qsr 
     
    281280#endif 
    282281 
    283 #if defined key_flx_core 
    284          CALL histdef( nid_T, "solhflup", "Latent Heat Flux Upward"         , "W/m2"   ,   &  ! qla 
    285             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    286          CALL histdef( nid_T, "solwfldo", "Longwave Radiation downward"     , "W/m2"   ,   &  ! qlw 
    287             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    288          CALL histdef( nid_T, "sosbhfup", "Sensible Heat Flux upward"       , "W/m2"   ,   &  ! qsb 
    289             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    290 #endif 
    291  
    292  
    293 #if defined key_coupled &&  ! defined key_lim3 && ! defined key_lim2    
     282 
     283 
     284#if ( defined key_coupled && ! defined key_lim3 && ! defined key_lim2 )  
    294285         CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    295286            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    317308#endif 
    318309 
    319 #if ( defined key_lim3  || defined key_lim2 ) && defined key_coupled 
     310#if defined key_coupled  
     311# if defined key_lim3 
     312         Must be adapted to LIM3 
     313# else 
    320314         CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature"            , "K"      ,   &  ! tn_ice 
    321315            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    322316         CALL histdef( nid_T,"soicealb" , "Ice Albedo"                         , "[0,1]"  ,   &  ! alb_ice 
    323317            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     318# endif  
    324319#endif  
    325320 
     
    334329#endif 
    335330         !                                                                                      !!! nid_U : 2D 
    336          CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! taux 
     331         CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! utau 
    337332            &          jpi, jpj, nh_U, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
    338333#if defined key_dynspg_rl 
     
    351346#endif 
    352347         !                                                                                      !!! nid_V : 2D 
    353          CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! tauy 
     348         CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! vtau 
    354349            &          jpi, jpj, nh_V, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
    355350#if defined key_dynspg_rl 
     
    423418      CALL histwrite( nid_T, "sossheig", it, sshn          , ndim_hT, ndex_hT )   ! sea surface height 
    424419#endif 
    425 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 
    426       CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
    427       CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
    428 #endif 
     420!!$#if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 
     421!!$      CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
     422!!$      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
     423!!$#endif 
    429424      CALL histwrite( nid_T, "sowaflup", it, emp           , ndim_hT, ndex_hT )   ! upward water flux 
    430       CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
     425!!$      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    431426      CALL histwrite( nid_T, "sowaflcd", it, emps          , ndim_hT, ndex_hT )   ! c/d water flux 
    432427      zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 
    433428      CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux 
    434       CALL histwrite( nid_T, "sohefldo", it, qt            , ndim_hT, ndex_hT )   ! total heat flux 
     429      CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux 
    435430      CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux 
    436431      CALL histwrite( nid_T, "somxl010", it, hmlp          , ndim_hT, ndex_hT )   ! mixed layer depth 
     
    443438      CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    444439#endif 
    445 #if defined key_flx_core 
    446       CALL histwrite( nid_T, "solhflup", it, qla           , ndim_hT, ndex_hT )   ! latent heat flux 
    447       CALL histwrite( nid_T, "solwfldo", it, qlw           , ndim_hT, ndex_hT )   ! longwave heat flux 
    448       CALL histwrite( nid_T, "sosbhfup", it, qsb           , ndim_hT, ndex_hT )   ! sensible heat flux 
    449 #endif 
    450 #if  defined key_coupled && ! defined key_lim3 && ! defined key_lim2  
     440#if ( defined key_coupled && ! defined key_lim3 && ! defined key_lim2 )  
    451441      CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    452442      CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
     
    466456      CALL histwrite( nid_T, "sohtc300", it, htc3          , ndim_hT, ndex_hT )   ! first 300m heaat content 
    467457#endif 
    468 #if ( defined key_lim3  ||  defined key_lim2 ) &&  defined key_coupled  
     458 
     459#if defined key_coupled  
     460# if defined key_lim3 
     461      Must be adapted for LIM3 
    469462      CALL histwrite( nid_T, "soicetem", it, tn_ice        , ndim_hT, ndex_hT )   ! surf. ice temperature 
    470463      CALL histwrite( nid_T, "soicealb", it, alb_ice       , ndim_hT, ndex_hT )   ! ice albedo 
     464# else 
     465      CALL histwrite( nid_T, "soicetem", it, tn_ice        , ndim_hT, ndex_hT )   ! surf. ice temperature 
     466      CALL histwrite( nid_T, "soicealb", it, alb_ice       , ndim_hT, ndex_hT )   ! ice albedo 
     467# endif 
    471468#endif 
    472469         ! Write fields on U grid 
     
    475472      CALL histwrite( nid_U, "vozoeivu", it, u_eiv         , ndim_U , ndex_U )    ! i-eiv current 
    476473#endif 
    477       CALL histwrite( nid_U, "sozotaux", it, taux          , ndim_hU, ndex_hU )   ! i-wind stress 
     474      CALL histwrite( nid_U, "sozotaux", it, utau          , ndim_hU, ndex_hU )   ! i-wind stress 
    478475#if defined key_dynspg_rl 
    479476      CALL lbc_lnk( spgu, 'U', -1. ) 
     
    486483      CALL histwrite( nid_V, "vomeeivv", it, v_eiv         , ndim_V , ndex_V  )   ! j-eiv current 
    487484#endif 
    488       CALL histwrite( nid_V, "sometauy", it, tauy          , ndim_hV, ndex_hV )   ! j-wind stress 
     485      CALL histwrite( nid_V, "sometauy", it, vtau          , ndim_hV, ndex_hV )   ! j-wind stress 
    489486#if defined key_dynspg_rl 
    490487      CALL lbc_lnk( spgv, 'V', -1. ) 
     
    640637 
    641638      ! Write all fields on T grid 
    642       CALL histwrite( id_i, "votemper", 1, tn    , jpi*jpj*jpk, idex )    ! now temperature 
    643       CALL histwrite( id_i, "vosaline", 1, sn    , jpi*jpj*jpk, idex )    ! now salinity 
    644 #if defined key_dynspg_rl 
    645       CALL histwrite( id_i, "sobarstf", 1, bsfn  , jpi*jpj    , idex )    ! barotropic streamfunction 
     639      CALL histwrite( id_i, "votemper", 1, tn      , jpi*jpj*jpk, idex )    ! now temperature 
     640      CALL histwrite( id_i, "vosaline", 1, sn      , jpi*jpj*jpk, idex )    ! now salinity 
     641#if defined key_dynspg_rl 
     642      CALL histwrite( id_i, "sobarstf", 1, bsfn     , jpi*jpj    , idex )    ! barotropic streamfunction 
    646643#else 
    647       CALL histwrite( id_i, "sossheig", 1, sshn  , jpi*jpj    , idex )    ! sea surface height 
    648 #endif 
    649       CALL histwrite( id_i, "vozocrtx", 1, un    , jpi*jpj*jpk, idex )    ! now i-velocity 
    650       CALL histwrite( id_i, "vomecrty", 1, vn    , jpi*jpj*jpk, idex )    ! now j-velocity 
    651       CALL histwrite( id_i, "vovecrtz", 1, wn    , jpi*jpj*jpk, idex )    ! now k-velocity 
    652       CALL histwrite( id_i, "sowaflup", 1, emp   , jpi*jpj    , idex )    ! freshwater budget 
    653       CALL histwrite( id_i, "sohefldo", 1, qt    , jpi*jpj    , idex )    ! total heat flux 
    654       CALL histwrite( id_i, "soshfldo", 1, qsr   , jpi*jpj    , idex )    ! total heat flux 
    655       CALL histwrite( id_i, "soicecov", 1, freeze, jpi*jpj    , idex )    ! ice cover 
    656       CALL histwrite( id_i, "sozotaux", 1, taux  , jpi*jpj    , idex )    ! i-wind stress 
    657       CALL histwrite( id_i, "sometauy", 1, tauy  , jpi*jpj    , idex )    ! j-wind stress 
     644      CALL histwrite( id_i, "sossheig", 1, sshn     , jpi*jpj    , idex )    ! sea surface height 
     645#endif 
     646      CALL histwrite( id_i, "vozocrtx", 1, un       , jpi*jpj*jpk, idex )    ! now i-velocity 
     647      CALL histwrite( id_i, "vomecrty", 1, vn       , jpi*jpj*jpk, idex )    ! now j-velocity 
     648      CALL histwrite( id_i, "vovecrtz", 1, wn       , jpi*jpj*jpk, idex )    ! now k-velocity 
     649      CALL histwrite( id_i, "sowaflup", 1, emp      , jpi*jpj    , idex )    ! freshwater budget 
     650      CALL histwrite( id_i, "sohefldo", 1, qsr + qns, jpi*jpj    , idex )    ! total heat flux 
     651      CALL histwrite( id_i, "soshfldo", 1, qsr      , jpi*jpj    , idex )    ! solar heat flux 
     652      CALL histwrite( id_i, "soicecov", 1, freeze   , jpi*jpj    , idex )    ! ice cover 
     653      CALL histwrite( id_i, "sozotaux", 1, utau     , jpi*jpj    , idex )    ! i-wind stress 
     654      CALL histwrite( id_i, "sometauy", 1, vtau     , jpi*jpj    , idex )    ! j-wind stress 
    658655 
    659656      ! 3. Close the file 
Note: See TracChangeset for help on using the changeset viewer.