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 11823 for NEMO/branches – NEMO

Changeset 11823 for NEMO/branches


Ignore:
Timestamp:
2019-10-29T12:00:04+01:00 (4 years ago)
Author:
mathiot
Message:

rm useless USE statement, option compatibility test + minor changes

Location:
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domain.F90

    r11553 r11823  
    2626   !!---------------------------------------------------------------------- 
    2727   USE oce            ! ocean variables 
    28    USE isfstp 
    2928   USE dom_oce        ! domain: ocean 
    3029   USE sbc_oce        ! surface boundary condition: ocean 
     
    449448#endif 
    450449      ! 
    451       ! need to know ln_isfcpl for istate (restart extrapolation) 
    452       ! and for domvvl_init (ssh extrapolation when recompute e3 variable 
    453       CALL isf_nam 
    454       ! 
    455450   END SUBROUTINE dom_nam 
    456451 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domvvl.F90

    r11553 r11823  
    1919   !!---------------------------------------------------------------------- 
    2020   USE oce             ! ocean dynamics and tracers 
    21    USE isfcpl 
    22    USE isf 
    2321   USE phycst          ! physical constant 
    2422   USE dom_oce         ! ocean space and time domain 
     
    3836 
    3937   PUBLIC  dom_vvl_init       ! called by domain.F90 
     38   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    4039   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    4140   PUBLIC  dom_vvl_sf_swp     ! called by step.F90 
     
    117116      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
    118117      !!---------------------------------------------------------------------- 
     118      ! 
     119      IF(lwp) WRITE(numout,*) 
     120      IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
     121      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     122      ! 
     123      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
     124      ! 
     125      !                    ! Allocate module arrays 
     126      IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
     127      ! 
     128      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
     129      CALL dom_vvl_rst( nit000, 'READ' ) 
     130      e3t_a(:,:,jpk) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
     131      ! 
     132      CALL dom_vvl_zgr() ! interpolation scale factor, depth and water column 
     133      ! 
     134   END SUBROUTINE dom_vvl_init 
     135   ! 
     136   SUBROUTINE dom_vvl_zgr() 
     137      !!---------------------------------------------------------------------- 
     138      !!                ***  ROUTINE dom_vvl_init  *** 
     139      !!                    
     140      !! ** Purpose :  Interpolation of all scale factors,  
     141      !!               depths and water column heights 
     142      !! 
     143      !! ** Method  :  - interpolate scale factors 
     144      !! 
     145      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b) 
     146      !!              - Regrid: e3(u/v)_n 
     147      !!                        e3(u/v)_b        
     148      !!                        e3w_n            
     149      !!                        e3(u/v)w_b       
     150      !!                        e3(u/v)w_n       
     151      !!                        gdept_n, gdepw_n and gde3w_n 
     152      !!              - h(t/u/v)_0 
     153      !!              - frq_rst_e3t and frq_rst_hdv 
     154      !! 
     155      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     156      !!---------------------------------------------------------------------- 
    119157      INTEGER ::   ji, jj, jk 
    120158      INTEGER ::   ii0, ii1, ij0, ij1 
    121159      REAL(wp)::   zcoef 
    122160      !!---------------------------------------------------------------------- 
    123       ! 
    124       IF(lwp) WRITE(numout,*) 
    125       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
    126       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    127       ! 
    128       CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
    129       ! 
    130       !                    ! Allocate module arrays 
    131       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
    132       ! 
    133       !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
    134       CALL dom_vvl_rst( nit000, 'READ' ) 
    135       e3t_a(:,:,jpk) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
    136161      ! 
    137162      !                    !== Set of all other vertical scale factors  ==!  (now and before) 
     
    265290      ENDIF 
    266291      ! 
    267    END SUBROUTINE dom_vvl_init 
    268  
     292   END SUBROUTINE dom_vvl_zgr 
    269293 
    270294   SUBROUTINE dom_vvl_sf_nxt( kt, kcall )  
     
    816840            id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 
    817841            ! 
    818             ! coupling with an ice sheet model (grounding/calving line migration) 
    819             IF ( ln_isfcpl ) THEN 
    820                ! 
    821                ! extrapolate ssh over new water column if needed 
    822                CALL isfcpl_ssh() 
    823                ! 
    824                ! e3t need to be computed where ice shelf draft changed (new ht_0) 
    825                id1 = 0 ; id2 = 0 ; id3 = 0 ; id4 = 0 ; id5 = 0 
    826                ! 
    827             END IF 
    828842            !                             ! --------- ! 
    829843            !                             ! all cases ! 
    830844            !                             ! --------- ! 
     845            ! 
    831846            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    832847               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 
     
    10461061      ! 
    10471062      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    1048       IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    10491063      ! 
    10501064      IF(lwp) THEN                   ! Print the choice 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90

    r11541 r11823  
    8686         END DO   
    8787      END DO 
    88  
    89       ztmp = 0.0 
    90       DO jk = jpkm1,1,-1 
    91          ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk) 
    92       END DO 
    93       CALL debug('divhor 1',ztmp) 
    94  
     88      ! 
    9589#if defined key_agrif 
    9690      IF( .NOT. Agrif_Root() ) THEN 
     
    10296#endif 
    10397      ! 
    104       IF( ln_rnf )   CALL sbc_rnf_div( hdivn )              !==  runoffs    ==!   (update hdivn field) 
     98      IF( ln_rnf )                      CALL sbc_rnf_div( hdivn )       !==  runoffs    ==!   (update hdivn field) 
    10599      ! 
    106100#if defined key_asminc  
     
    109103#endif 
    110104      ! 
    111       IF( ln_isf .OR. ln_isfcpl )   CALL isf_hdiv( kt, hdivn )      !==  ice shelf  ==!   (update hdivn field) 
     105      IF( ln_isf .AND. kt /= 0 )        CALL isf_hdiv( kt, hdivn )      !==  ice shelf  ==!   (update hdivn field) 
    112106      ! 
    113107      CALL lbc_lnk( 'divhor', hdivn, 'T', 1. )   !   (no sign change) 
    114       ! 
    115       ztmp = 0.0 
    116       DO jk = jpkm1,1,-1 
    117          ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk) 
    118       END DO 
    119       CALL debug('divhor 2',ztmp) 
    120108      ! 
    121109      IF( ln_timing )   CALL timing_stop('div_hor') 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/IOM/restart.F90

    r11553 r11823  
    1919   !!---------------------------------------------------------------------- 
    2020   USE oce             ! ocean dynamics and tracers  
    21    USE isf             ! ice shelf 
    22    USE isfcpl          ! ice shelf coupling 
    2321   USE dom_oce         ! ocean space and time domain 
    2422   USE sbc_ice         ! only lk_si3  
     
    284282      ENDIF 
    285283      ! 
    286       ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction 
    287       IF ( ln_isfcpl ) CALL isfcpl_init() 
    288       ! 
    289284      IF( neuler == 0 ) THEN                                  ! Euler restart (neuler=0) 
    290285         tsb  (:,:,:,:) = tsn  (:,:,:,:)                             ! all before fields set to now values 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90

    r11553 r11823  
    1616   USE isfutils       ! debuging 
    1717   USE lib_mpp        ! mpp routine 
     18   USE domvvl         ! vertical scale factor interpolation 
    1819   ! 
    1920   USE in_out_manager ! I/O manager 
     
    6263      ! 
    6364      ! mask velocity properly (mask used in restart not compatible with new mask) 
    64       un(:,:,:) = un(:,:,:,) * umask(:,:,:) 
    65       vn(:,:,:) = vn(:,:,:,) * vmask(:,:,:) 
     65      un(:,:,:) = un(:,:,:) * umask(:,:,:) 
     66      vn(:,:,:) = vn(:,:,:) * vmask(:,:,:) 
    6667      ! 
    6768      ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
     
    9192   END SUBROUTINE isfcpl_rst_write 
    9293 
    93    SUBROUTINE isfcpl_ssh () 
     94   SUBROUTINE isfcpl_ssh 
    9495      !!----------------------------------------------------------------------  
    9596      !!                   ***  ROUTINE iscpl_ssh  *** 
     
    149150      sshn(:,:) = zssh(:,:) * ssmask(:,:) 
    150151      ! 
    151       ! force to start on an euler time step 
    152       neuler = 0 
    153       ! 
    154152      sshb(:,:) = sshn(:,:) 
    155153      ! 
     154      ! recompute the vertical scale factor, depth and water thickness 
     155      CALL dom_vvl_zgr 
     156      ! 
    156157   END SUBROUTINE isfcpl_ssh 
    157158 
    158    SUBROUTINE isfcpl_tra () 
     159   SUBROUTINE isfcpl_tra 
    159160      !!----------------------------------------------------------------------  
    160161      !!                   ***  ROUTINE iscpl_tra  *** 
     
    297298      tsn(:,:,:,jp_sal) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 
    298299      ! 
     300      tsb(:,:,:,:) = tsn(:,:,:,:) 
     301      ! 
    299302      ! sanity check 
    300303      ! ----------------------------------------------------------------------------------------- 
     
    383386      CALL lbc_lnk( 'iscpl', zqvolb, 'T', 1. ) 
    384387      CALL lbc_lnk( 'iscpl', zqvoln, 'T', 1. ) 
    385       DO jk = 1,jpk 
    386       CALL debug('zqvolb',zqvolb(:,:,jk)) 
    387       END DO 
    388       DO jk = 1,jpk 
    389       CALL debug('zqvoln',zqvoln(:,:,jk)) 
    390       END DO 
    391388      ! 
    392389      ! get 3d tra increment to apply at the first time step 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfload.F90

    r11553 r11823  
    7676      ! 
    7777      !                                !- assume water displaced by the ice shelf is at T=-1.9 and S=34.4 (rude) 
    78       zts_top(:,:,jp_tem) = -1.9_wp   ;   zts_top(:,:,jp_sal) = 35.4_wp 
     78      zts_top(:,:,jp_tem) = -1.9_wp   ;   zts_top(:,:,jp_sal) = 34.4_wp 
    7979      ! 
    8080      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90

    r11553 r11823  
    1515   USE oce            ! ocean dynamics and tracers 
    1616   USE dom_oce        ! ocean space and time domain 
     17   USE domvvl, ONLY : ln_vvl_zstar 
    1718   USE phycst         ! physical constants 
    1819   USE eosbn2         ! equation of state 
     
    120121      !! ** Purpose :   Initialisation of the ice shelf public variables 
    121122      !! 
    122       !! ** Method  :   Read the namsbc namelist and set derived parameters 
    123       !!                Call init routines for all other SBC modules that have one 
    124       !! 
    125       !! ** Action  : - read namsbc parameters 
     123      !! ** Method  :   Read the namisf namelist, check option compatibility and set derived parameters 
     124      !! 
     125      !! ** Action  : - read namisf parameters 
    126126      !!              - allocate memory 
    127       !!              - call cav/param init routine 
     127      !!              - output print 
     128      !!              - ckeck option compatibility 
     129      !!              - call cav/param/isfcpl init routine 
    128130      !!---------------------------------------------------------------------- 
    129131      ! 
     
    144146      ! terminate routine now if no ice shelf melt formulation specify 
    145147      IF ( ln_isf ) THEN 
    146          ! 
    147          !--------------------------------------------------------------------------------------------------------------------- 
    148          ! initialisation melt in the cavity 
    149          IF ( ln_isfcav_mlt ) THEN 
    150             ! 
    151             ! initialisation  of cav variable 
    152             CALL isf_cav_init() 
    153             ! 
    154             ! read cav variable from restart 
    155             IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 
    156             ! 
    157          END IF 
    158          ! 
    159          !--------------------------------------------------------------------------------------------------------------------- 
    160          ! initialisation parametrised melt 
    161          IF ( ln_isfpar_mlt ) THEN 
    162             ! 
    163             ! initialisation  of par variable 
    164             CALL isf_par_init() 
    165             ! 
    166             ! read par variable from restart 
    167             IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 
    168             ! 
    169          END IF 
    170148         ! 
    171149         !--------------------------------------------------------------------------------------------------------------------- 
     
    173151         IF( ln_isfcpl ) THEN  
    174152            ! 
     153            ! start on an euler time step 
     154            neuler = 0 
     155            ! 
     156            ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction 
     157            CALL isfcpl_init() 
     158            ! 
     159            ! all before fields set to now values 
     160            tsb  (:,:,:,:) = tsn  (:,:,:,:) 
     161            ub   (:,:,:)   = un   (:,:,:) 
     162            vb   (:,:,:)   = vn   (:,:,:) 
     163            sshb (:,:)     = sshn (:,:) 
     164            e3t_b(:,:,:)   = e3t_n(:,:,:) 
     165  
    175166            ! prepare writing restart 
    176167            IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
     
    182173         END IF 
    183174         ! 
     175         !--------------------------------------------------------------------------------------------------------------------- 
     176         ! initialisation melt in the cavity 
     177         IF ( ln_isfcav_mlt ) THEN 
     178            ! 
     179            ! initialisation  of cav variable 
     180            CALL isf_cav_init() 
     181            ! 
     182            ! read cav variable from restart 
     183            IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 
     184            ! 
     185         END IF 
     186         ! 
     187         !--------------------------------------------------------------------------------------------------------------------- 
     188         ! initialisation parametrised melt 
     189         IF ( ln_isfpar_mlt ) THEN 
     190            ! 
     191            ! initialisation  of par variable 
     192            CALL isf_par_init() 
     193            ! 
     194            ! read par variable from restart 
     195            IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 
     196            ! 
     197         END IF 
     198         ! 
    184199      END IF 
    185200          
    186201  END SUBROUTINE isf_init 
    187202 
    188   SUBROUTINE isf_ctl()! 
     203  SUBROUTINE isf_ctl() 
     204      !!--------------------------------------------------------------------- 
     205      !!                  ***  ROUTINE isf_ctl  *** 
     206      !! 
     207      !! ** Purpose :   output print and option compatibility check 
     208      !! 
     209      !!---------------------------------------------------------------------- 
    189210      IF (lwp) THEN 
    190211         WRITE(numout,*) 
     
    272293         END IF 
    273294         ! 
     295         ! compatibility ice shelf and vvl 
     296         IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
     297         ! 
    274298      END IF 
    275299   END SUBROUTINE isf_ctl 
Note: See TracChangeset for help on using the changeset viewer.