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 5866 for branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90 – NEMO

Ignore:
Timestamp:
2015-11-06T11:42:35+01:00 (8 years ago)
Author:
gm
Message:

#1613: vvl by default: add ln_linssh and remove key_vvl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90

    r5845 r5866  
    109109      IF( ln_trabbc )   z_frc_trd_t = z_frc_trd_t +               glob_sum( qgh_trd0(:,:) * surf(:,:) ) 
    110110      ! 
    111       IF( .NOT. lk_vvl ) THEN 
     111      IF( ln_linssh ) THEN 
    112112         IF ( ln_isfcav ) THEN 
    113113            DO ji=1,jpi 
     
    129129      frc_s = frc_s + z_frc_trd_s * rdt 
    130130      !                                          ! Advection flux through fixed surface (z=0) 
    131       IF( .NOT. lk_vvl ) THEN 
     131      IF( ln_linssh ) THEN 
    132132         frc_wn_t = frc_wn_t + z_wn_trd_t * rdt 
    133133         frc_wn_s = frc_wn_s + z_wn_trd_s * rdt 
     
    145145 
    146146      ! heat & salt content variation (associated with ssh) 
    147       IF( .NOT. lk_vvl ) THEN 
     147      IF( ln_linssh ) THEN 
    148148         IF ( ln_isfcav ) THEN 
    149149            DO ji = 1, jpi 
     
    175175      ! Substract forcing from heat content, salt content and volume variations 
    176176      zdiff_v1 = zdiff_v1 - frc_v 
    177       IF( lk_vvl )   zdiff_v2 = zdiff_v2 - frc_v 
     177      IF( .NOT.ln_linssh )   zdiff_v2 = zdiff_v2 - frc_v 
    178178      zdiff_hc = zdiff_hc - frc_t 
    179179      zdiff_sc = zdiff_sc - frc_s 
    180       IF( .NOT. lk_vvl ) THEN 
     180      IF( ln_linssh ) THEN 
    181181         zdiff_hc1 = zdiff_hc + z_ssh_hc  
    182182         zdiff_sc1 = zdiff_sc + z_ssh_sc 
     
    194194 
    195195!!gm to be added ? 
    196 !      IF( .NOT. lk_vvl ) THEN            ! fixed volume, add the ssh contribution 
     196!      IF( ln_linssh ) THEN            ! fixed volume, add the ssh contribution 
    197197!        zvol_tot = zvol_tot + glob_sum( surf(:,:) * sshn(:,:) ) 
    198198!      ENDIF 
    199199!!gm end 
    200200 
    201       IF( lk_vvl ) THEN 
     201      IF( .NOT.ln_linssh ) THEN 
    202202        CALL iom_put( 'bgtemper' , zdiff_hc / zvol_tot )              ! Temperature variation (C)  
    203203        CALL iom_put( 'bgsaline' , zdiff_sc / zvol_tot )              ! Salinity    variation (psu) 
     
    256256           CALL iom_get( numror, 'frc_t', frc_t ) 
    257257           CALL iom_get( numror, 'frc_s', frc_s ) 
    258            IF( .NOT. lk_vvl ) THEN 
     258           IF( ln_linssh ) THEN 
    259259              CALL iom_get( numror, 'frc_wn_t', frc_wn_t ) 
    260260              CALL iom_get( numror, 'frc_wn_s', frc_wn_s ) 
     
    264264           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini ) 
    265265           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini ) 
    266            IF( .NOT. lk_vvl ) THEN 
     266           IF( ln_linssh ) THEN 
    267267              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 
    268268              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 
     
    281281          frc_t = 0._wp                                           ! heat content   -    -   -    -    
    282282          frc_s = 0._wp                                           ! salt content   -    -   -    -         
    283           IF( .NOT. lk_vvl ) THEN 
     283          IF( ln_linssh ) THEN 
    284284             IF ( ln_isfcav ) THEN 
    285285                DO ji=1,jpi 
     
    307307        CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t     ) 
    308308        CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s     ) 
    309         IF( .NOT. lk_vvl ) THEN 
     309        IF( ln_linssh ) THEN 
    310310           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 
    311311           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 
     
    315315        CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini ) 
    316316        CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini ) 
    317         IF( .NOT. lk_vvl ) THEN 
     317        IF( ln_linssh ) THEN 
    318318           CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 
    319319           CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 
     
    384384      ENDIF 
    385385 
    386       IF(.NOT. lk_vvl ) ALLOCATE( ssh_hc_loc_ini(jpi,jpj), ssh_sc_loc_ini(jpi,jpj),STAT=ierror ) 
     386      IF( ln_linssh )  ALLOCATE( ssh_hc_loc_ini(jpi,jpj), ssh_sc_loc_ini(jpi,jpj),STAT=ierror ) 
    387387      IF( ierror > 0 ) THEN 
    388388         CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' )   ;   RETURN 
Note: See TracChangeset for help on using the changeset viewer.