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 11902 for NEMO – NEMO

Changeset 11902 for NEMO


Ignore:
Timestamp:
2019-11-13T20:07:33+01:00 (4 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF_nemo: add check on presence of restart variables

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

Legend:

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

    r11852 r11902  
    1313   !!---------------------------------------------------------------------- 
    1414   USE isf                             ! ice shelf variable 
     15   USE isfutils, ONLY : debug 
    1516   USE lib_mpp, ONLY: mpp_sum, mpp_max ! mpp routine 
    1617   USE domvvl , ONLY: dom_vvl_zgr      ! vertical scale factor interpolation 
     
    4647CONTAINS 
    4748   SUBROUTINE isfcpl_init() 
     49      !!--------------------------------------------------------------------- 
     50      !! 
     51      !!--------------------------------------------------------------------- 
     52      INTEGER :: id 
     53      !!---------------------------------------------------------------------- 
    4854      ! 
    4955      ! start on an euler time step 
    5056      neuler = 0 
    5157      !  
     58      ! allocation and initialisation to 0 
    5259      CALL isf_alloc_cpl() 
    5360      ! 
    54       ! extrapolation ssh 
    55       CALL isfcpl_ssh() 
    56       ! 
    57       ! extrapolation tracer properties 
    58       CALL isfcpl_tra() 
    59       ! 
    60       ! correction of the horizontal divergence and associated temp. and salt content flux 
    61       ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
    62       !           - decide how to manage thickness level change in conservation 
    63       CALL isfcpl_vol() 
    64       ! 
    65       ! apply the 'conservation' method 
    66       IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 
     61      ! check presence of variable needed for coupling 
     62      ! iom_varid return 0 if not found 
     63      id = 0 
     64      id = id * iom_varid(numror, 'ssmask', ldstop = .false.) 
     65      id = id * iom_varid(numror, 'tmask' , ldstop = .false.) 
     66      id = id * iom_varid(numror, 'e3t_n' , ldstop = .false.) 
     67      id = id * iom_varid(numror, 'e3u_n' , ldstop = .false.) 
     68      id = id * iom_varid(numror, 'e3v_n' , ldstop = .false.) 
     69      IF(lwp) WRITE(numout,*) ' isfcpl_init:', id 
     70      IF (id == 0) THEN 
     71         IF(lwp) WRITE(numout,*) ' isfcpl_init: restart variables for ice sheet coupling are missing, skip coupling for this leg '  
     72         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~' 
     73         IF(lwp) WRITE(numout,*) '' 
     74      ELSE 
     75         ! extrapolation ssh 
     76         CALL isfcpl_ssh() 
     77         ! 
     78         ! extrapolation tracer properties 
     79         CALL isfcpl_tra() 
     80         ! 
     81         ! correction of the horizontal divergence and associated temp. and salt content flux 
     82         ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
     83         !           - decide how to manage thickness level change in conservation 
     84         CALL isfcpl_vol() 
     85         ! 
     86         ! apply the 'conservation' method 
     87         IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 
     88         ! 
     89      END IF 
    6790      ! 
    6891      ! mask velocity properly (mask used in restart not compatible with new mask) 
     
    169192      sshb(:,:) = sshn(:,:) 
    170193      ! 
     194      IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',sshn(:,:)) 
     195      ! 
    171196      ! recompute the vertical scale factor, depth and water thickness 
    172197      CALL dom_vvl_zgr() 
     
    198223      !!---------------------------------------------------------------------- 
    199224      !  
    200       IF(lwp) WRITE(numout,*) ' isfrst_cpl_read: read ice sheet coupling restart variable '  
    201       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~' 
    202       IF(lwp) WRITE(numout,*) '' 
    203       ! 
    204225      CALL iom_get( numror, jpdom_autoglo, 'tmask'  , ztmask_b, ldxios = lrxios   ) ! need to extrapolate T/S 
    205226      !CALL iom_get( numror, jpdom_autoglo, 'wmask'  , zwmask_b, ldxios = lrxios   ) ! need to extrapolate T/S 
     
    401422      ! 
    402423      CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. ) 
    403       CALL lbc_lnk( 'iscpl', zqvolb, 'T', 1. ) 
    404       CALL lbc_lnk( 'iscpl', zqvoln, 'T', 1. ) 
    405424      ! 
    406425      ! get 3d tra increment to apply at the first time step 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90

    r11852 r11902  
    22 
    33   USE isf                    ! ice shelf 
     4   USE isfutils  
    45   USE dom_oce                ! time and space domain 
    56   USE phycst , ONLY: r1_rau0 ! physical constant 
     
    3536         IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv) 
    3637         ! 
    37          ! 
    3838         ! ice sheet coupling contribution  
    3939         IF ( ln_isfcpl .AND. kt /= 0 ) THEN 
     
    4646            ! conservation option 
    4747            IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 
     48            ! 
     49            IF ( ln_isfdebug ) THEN 
     50               CALL debug('isfdiv: phdiv'      ,phdiv(:,:,:)) 
     51               CALL debug('isfdiv: risfcpl_vol',risfcpl_vol(:,:,:)) 
     52               CALL debug('isfdiv: fwfisf     ',fwfisf_cav(:,:)+fwfisf_cav_b(:,:)) 
     53            END IF 
    4854            ! 
    4955         END IF 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90

    r11541 r11902  
    4848      IF( ln_timing )   CALL timing_start('tra_isf') 
    4949      ! 
     50      IF( kt == nit000 ) THEN 
     51         IF(lwp) WRITE(numout,*) 
     52         IF(lwp) WRITE(numout,*) 'tra_isf : Ice shelf heat fluxes' 
     53         IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
     54      ENDIF 
     55      ! 
    5056      ! cavity case 
    5157      IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa) 
     
    6369         IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 
    6470         ! 
     71      END IF 
     72      ! 
     73      IF ( ln_isfdebug ) THEN 
     74         CALL debug('tra_isf: risfcpl_tsc T',risfcpl_tsc(:,:,1)) 
     75         CALL debug('tra_isf: risfcpl_tsc S',risfcpl_tsc(:,:,2)) 
     76         CALL debug('tra_isf: tsa T'        ,tsa(:,:,:,1)) 
     77         CALL debug('tra_isf: tsa S'        ,tsa(:,:,:,2)) 
    6578      END IF 
    6679      ! 
Note: See TracChangeset for help on using the changeset viewer.