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 13954 – NEMO

Changeset 13954


Ignore:
Timestamp:
2020-12-01T20:41:49+01:00 (3 years ago)
Author:
smueller
Message:

Merging of changesets [12591,12602,12608,13082,13094,13096,13950] made in branch /NEMO/branches/2020/ticket_2377 into /NEMO/branches/2020/r13916_ticket2377 (ticket #2377)

Location:
NEMO/branches/2020/r13916_ticket2377
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r13916_ticket2377/cfgs/SHARED/namelist_ref

    r13731 r13954  
    195195!!   namsbc_wave     external fields from wave model                    (ln_wave    =T) 
    196196!!   namberg         iceberg floats                                     (ln_icebergs=T) 
     197!!   namsbc_fwb      freshwater-budget adjustment                       (nn_fwb > 0) 
    197198!!====================================================================== 
    198199! 
     
    625626   sn_icb     =  'calving'              ,         -1.        ,'calvingmask',  .true.   , .true. , 'yearly'  , ''               , ''       , '' 
    626627/ 
     628!----------------------------------------------------------------------- 
     629&namsbc_fwb    !   freshwater-budget adjustment                         (nn_fwb > 0) 
     630!----------------------------------------------------------------------- 
     631   rn_fwb0     = 0.0          ! Initial freshwater adjustment flux [kg/m2/s] (nn_fwb = 2) 
     632/ 
    627633 
    628634!!====================================================================== 
  • NEMO/branches/2020/r13916_ticket2377/doc/latex/NEMO/subfiles/chap_SBC.tex

    r13916 r13954  
    1818    Release & Author(s) & Modifications \\ 
    1919    \hline 
    20     {\em  next} & {\em Simon M{\" u}ller} & {\em Update of \autoref{sec:SBC_TDE}}\\[2mm] 
     20    {\em  next} & {\em Simon M{\" u}ller} & {\em Update of \autoref{sec:SBC_TDE}; revision of \autoref{subsec:SBC_fwb}}\\[2mm] 
    2121    {\em   4.0} & {\em ...} & {\em ...} \\ 
    2222    {\em   3.6} & {\em ...} & {\em ...} \\ 
     
    18331833\label{subsec:SBC_fwb} 
    18341834 
    1835 For global ocean simulation, it can be useful to introduce a control of the mean sea level in order to 
    1836 prevent unrealistic drift of the sea surface height due to inaccuracy in the freshwater fluxes. 
    1837 In \NEMO, two way of controlling the freshwater budget are proposed: 
     1835\begin{listing} 
     1836  \nlst{namsbc_fwb} 
     1837  \caption{\forcode{&namsbc_fwb}} 
     1838  \label{lst:namsbc_fwb} 
     1839\end{listing} 
     1840 
     1841For global ocean simulations, it can be useful to introduce a control of the 
     1842mean sea level in order to prevent unrealistic drifting of the sea surface 
     1843height due to unbalanced freshwater fluxes. In \NEMO, two options for 
     1844controlling the freshwater budget are proposed. 
    18381845 
    18391846\begin{description} 
    1840 \item [{\np[=0]{nn_fwb}{nn\_fwb}}] no control at all. 
    1841   The mean sea level is free to drift, and will certainly do so. 
    1842 \item [{\np[=1]{nn_fwb}{nn\_fwb}}] global mean \textit{emp} set to zero at each model time step. 
     1847\item [{\np[=0]{nn_fwb}{nn\_fwb}}:] No control at all; the mean sea level is 
     1848  free to drift, and will certainly do so. 
     1849\item [{\np[=1]{nn_fwb}{nn\_fwb}}:] The global mean \textit{emp} is set to zero at each model time step. 
    18431850  %GS: comment below still relevant ? 
    18441851  %Note that with a sea-ice model, this technique only controls the mean sea level with linear free surface and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 
    1845 \item [{\np[=2]{nn_fwb}{nn\_fwb}}] freshwater budget is adjusted from the previous year annual mean budget which 
    1846   is read in the \textit{EMPave\_old.dat} file. 
    1847   As the model uses the Boussinesq approximation, the annual mean fresh water budget is simply evaluated from 
    1848   the change in the mean sea level at January the first and saved in the \textit{EMPav.dat} file. 
     1852\item [{\np[=2]{nn_fwb}{nn\_fwb}}:] \textit{emp} is adjusted by adding a 
     1853  spatially uniform, annual-mean freshwater flux that balances the freshwater 
     1854  budget at the end of the previous year; as the model uses the Boussinesq 
     1855  approximation, the freshwater budget can be evaluated from the change in the 
     1856  mean sea level and in the ice and snow mass after the end of each simulation 
     1857  year; at the start of the model run, an initial adjustment flux can be set 
     1858  using parameter \np{rn_rwb0}{rn\_fwb0} in namelist \nam{sbc_fwb}{sbc\_fwb}. 
    18491859\end{description} 
    18501860 
  • NEMO/branches/2020/r13916_ticket2377/src/OCE/IOM/iom.F90

    r13747 r13954  
    537537        i = i + 1; fields(i)%vname="hbli";           fields(i)%grid="grid_N" 
    538538        i = i + 1; fields(i)%vname="wn";             fields(i)%grid="grid_N_3D" 
     539        i = i + 1; fields(i)%vname="a_fwb";          fields(i)%grid="grid_scalar" 
    539540 
    540541        IF( i-1 > max_rst_fields) THEN 
  • NEMO/branches/2020/r13916_ticket2377/src/OCE/IOM/iom_def.F90

    r13558 r13954  
    5959   END TYPE file_descriptor 
    6060   TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files 
    61    INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 95 !: maximum number of restart variables defined in iom_set_rst_vars 
     61   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 96 !: maximum number of restart variables defined in iom_set_rst_vars 
    6262   TYPE, PUBLIC :: RST_FIELD   
    6363    CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file 
  • NEMO/branches/2020/r13916_ticket2377/src/OCE/SBC/sbcfwb.F90

    r13582 r13954  
    2424   ! 
    2525   USE in_out_manager ! I/O manager 
     26   USE iom            ! IOM 
    2627   USE lib_mpp        ! distribued memory computing library 
    2728   USE timing         ! Timing 
     
    3435   PUBLIC   sbc_fwb    ! routine called by step 
    3536 
    36    REAL(wp) ::   a_fwb_b   ! annual domain averaged freshwater budget 
    37    REAL(wp) ::   a_fwb     ! for 2 year before (_b) and before year. 
    38    REAL(wp) ::   fwfold    ! fwfold to be suppressed 
     37   REAL(wp) ::   rn_fwb0   ! initial freshwater adjustment flux [kg/m2/s] (nn_fwb = 2 only) 
     38   REAL(wp) ::   a_fwb     ! annual domain averaged freshwater budget from the 
     39                           ! previous year 
    3940   REAL(wp) ::   area      ! global mean ocean surface (interior domain) 
    4041 
     
    6566      INTEGER, INTENT( in ) ::   Kmm      ! ocean time level index 
    6667      ! 
    67       INTEGER  ::   inum, ikty, iyear     ! local integers 
     68      INTEGER  ::   ios, inum, ikty       ! local integers 
    6869      REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp                ! local scalars 
    6970      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread, zcoef          !   -      - 
     
    7273      REAL(wp)   ,DIMENSION(1) ::   z_fwfprv   
    7374      COMPLEX(dp),DIMENSION(1) ::   y_fwfnow   
     75      ! 
     76      NAMELIST/namsbc_fwb/rn_fwb0 
    7477      !!---------------------------------------------------------------------- 
    7578      ! 
    7679      IF( kt == nit000 ) THEN 
     80         READ( numnam_ref, namsbc_fwb, IOSTAT = ios, ERR = 901 ) 
     81901      IF( ios /= 0 ) CALL ctl_nam( ios, 'namsbc_fwb in reference namelist'     ) 
     82         READ( numnam_cfg, namsbc_fwb, IOSTAT = ios, ERR = 902 ) 
     83902      IF( ios >  0 ) CALL ctl_nam( ios, 'namsbc_fwb in configuration namelist' ) 
     84         IF(lwm) WRITE( numond, namsbc_fwb ) 
    7785         IF(lwp) THEN 
    7886            WRITE(numout,*) 
     
    8088            WRITE(numout,*) '~~~~~~~' 
    8189            IF( kn_fwb == 1 )   WRITE(numout,*) '          instantaneously set to zero' 
    82             IF( kn_fwb == 2 )   WRITE(numout,*) '          adjusted from previous year budget' 
    8390            IF( kn_fwb == 3 )   WRITE(numout,*) '          fwf set to zero and spread out over erp area' 
     91            IF( kn_fwb == 2 ) THEN 
     92               WRITE(numout,*) '          adjusted from previous year budget' 
     93               WRITE(numout,*) 
     94               WRITE(numout,*) '   Namelist namsbc_fwb' 
     95               WRITE(numout,*) '      Initial freshwater adjustment flux [kg/m2/s] = ', rn_fwb0 
     96            END IF 
    8497         ENDIF 
    8598         ! 
     
    112125         ENDIF 
    113126         ! 
    114       CASE ( 2 )                             !==  fwf budget adjusted from the previous year  ==! 
    115          ! 
    116          IF( kt == nit000 ) THEN                      ! initialisation 
    117             !                                         ! Read the corrective factor on precipitations (fwfold) 
    118             CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    119             READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 
    120             CLOSE( inum ) 
    121             fwfold = a_fwb                            ! current year freshwater budget correction 
    122             !                                         ! estimate from the previous year budget 
     127      CASE ( 2 )                             !==  fw adjustment based on fw budget at the end of the previous year  ==! 
     128         ! 
     129         IF( kt == nit000 ) THEN                                                                    ! initialisation 
     130            !                                                                                       ! set the fw adjustment (a_fwb) 
     131            IF ( ln_rstart .AND. iom_varid( numror, 'a_fwb',   ldstop = .FALSE. ) > 0 ) THEN        !    as read from restart file 
     132               IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' 
     133               CALL iom_get( numror, 'a_fwb',   a_fwb,   ldxios = lrxios ) 
     134            ELSE                                                                                    !    as specified in namelist 
     135               a_fwb = rn_fwb0 
     136            END IF 
     137            ! 
    123138            IF(lwp)WRITE(numout,*) 
    124             IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear  , ' freshwater budget correction = ', fwfold 
    125             IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb 
    126             IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b 
     139            IF(lwp)WRITE(numout,*)'sbc_fwb : initial freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 
     140            ! 
     141            IF( lwxios ) THEN                         ! Activate output of restart variables 
     142               CALL iom_set_rstw_var_active( 'a_fwb'   ) 
     143            END IF 
    127144         ENDIF    
    128          !                                         ! Update fwfold if new year start 
     145         !                                         ! Update a_fwb if new year start 
    129146         ikty = 365 * 86400 / rn_Dt                  !!bug  use of 365 days leap year or 360d year !!!!!!! 
    130147         IF( MOD( kt, ikty ) == 0 ) THEN 
    131             a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
     148                                                      ! mean sea level taking into account the ice+snow 
    132149                                                      ! sum over the global domain 
    133150            a_fwb   = glob_sum( 'sbcfwb', e1e2t(:,:) * ( ssh(:,:,Kmm) + snwice_mass(:,:) * r1_rho0 ) ) 
    134151            a_fwb   = a_fwb * 1.e+3 / ( area * rday * 365. )     ! convert in Kg/m3/s = mm/s 
    135152!!gm        !                                                      !!bug 365d year  
    136             fwfold =  a_fwb                           ! current year freshwater budget correction 
    137             !                                         ! estimate from the previous year budget 
    138153         ENDIF 
    139154         !  
    140155         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN         ! correct the freshwater fluxes 
    141             zcoef = fwfold * rcp 
    142             emp(:,:) = emp(:,:) + fwfold             * tmask(:,:,1) 
     156            zcoef = a_fwb * rcp 
     157            emp(:,:) = emp(:,:) + a_fwb              * tmask(:,:,1) 
    143158            qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 
    144159         ENDIF 
    145          ! 
    146          IF( kt == nitend .AND. lwm ) THEN            ! save fwfold value in a file (only one required) 
    147             CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 
    148             WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb 
    149             CLOSE( inum ) 
    150          ENDIF 
     160         ! Output restart information 
     161         IF( lrst_oce ) THEN 
     162            IF(lwp) WRITE(numout,*) 
     163            IF(lwp) WRITE(numout,*) 'sbc_fwb : writing FW-budget adjustment to ocean restart file at it = ', kt 
     164            IF(lwp) WRITE(numout,*) '~~~~' 
     165            IF( lwxios ) CALL iom_swap( cwxios_context ) 
     166            CALL iom_rstput( kt, nitrst, numrow, 'a_fwb',   a_fwb,   ldxios = lwxios ) 
     167            IF( lwxios ) CALL iom_swap( cxios_context  ) 
     168         END IF 
     169         ! 
     170         IF( kt == nitend .AND. lwp ) WRITE(numout,*) 'sbc_fwb : final freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 
    151171         ! 
    152172      CASE ( 3 )                             !==  global fwf set to zero and spread out over erp area  ==! 
Note: See TracChangeset for help on using the changeset viewer.