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 11541 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90 – NEMO

Ignore:
Timestamp:
2019-09-12T18:41:17+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF: simplify use of ln_isf, add extra comments + minor changes (ticket #2142)

File:
1 edited

Legend:

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

    r11529 r11541  
    7575         ! 
    7676         ! compute tbl lvl/h 
     77         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
    7778         CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
    7879         ! 
     
    9495         ! 
    9596         ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
     97         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
    9698         CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
    9799         ! 
     
    140142      CALL isf_alloc() 
    141143      ! 
     144      ! initalisation of fwf and tsc array to 0 
    142145      riceload(:,:)       = 0.0_wp 
    143146      fwfisf_oasis(:,:)   = 0.0_wp 
     
    166169         IF ( ln_isf ) THEN 
    167170            WRITE(numout,*) '      melt inside the cavity                  ln_isfcav_mlt   = ', ln_isfcav_mlt 
    168             IF ( ln_isfcav ) THEN 
     171            IF ( ln_isfcav_mlt) THEN 
    169172               WRITE(numout,*) '         melt formulation                        cn_isfcav_mlt   = ', TRIM(cn_isfcav_mlt) 
    170173               WRITE(numout,*) '         thickness of the top boundary layer     rn_htbl     = ', rn_htbl 
     
    184187            WRITE(numout,*) '' 
    185188            ! 
     189            WRITE(numout,*) '      Coupling to an ice sheet model          ln_isfcpl        = ', ln_isfcpl 
     190            IF ( ln_isfcpl ) THEN 
     191               WRITE(numout,*) '         conservation activated ln_isfcpl_cons           = ', ln_isfcpl_cons 
     192               WRITE(numout,*) '            number of call of the extrapolation loop = ', nn_drown 
     193            ENDIF 
     194            WRITE(numout,*) '' 
     195            ! 
    186196         ELSE 
     197 
    187198            IF ( ln_isfcav ) THEN 
    188199               WRITE(numout,*) '' 
     
    192203         END IF 
    193204 
    194          WRITE(numout,*) '      Coupling to an ice sheet model          ln_isfcpl         = ', ln_isfcpl 
    195          IF ( ln_isfcpl ) THEN 
    196             WRITE(numout,*) '         conservation activated ln_isfcpl_cons           = ', ln_isfcpl_cons 
    197             WRITE(numout,*) '            number of call of the extrapolation loop = ', nn_drown 
    198          ENDIF 
    199          ! 
    200205         IF (ln_isfcav) WRITE(numout,*) '      Ice shelf load method                   cn_isfload        = ', TRIM(cn_isfload) 
    201206         WRITE(numout,*) '' 
     
    251256      IF ( ln_isf ) THEN 
    252257         ! 
    253          ! initialisation useful variable 
    254          r1_Lfusisf =  1._wp / rLfusisf 
    255          ! 
     258         !--------------------------------------------------------------------------------------------------------------------- 
    256259         ! initialisation melt in the cavity 
    257260         IF ( ln_isfcav_mlt ) THEN 
     
    276279            ! 
    277280         END IF 
    278       END IF 
    279       ! 
    280       !--------------------------------------------------------------------------------------------------------------------- 
    281       ! initialisation ice sheet coupling 
    282       ! 
    283       ll_isfcpl     = .FALSE. 
    284       ll_isfcpl_cons= .FALSE. 
    285       ! 
    286       IF( ln_isfcpl ) THEN 
    287  
    288          ! prepare writing restart 
    289          IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
    290          IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 
    291          !IF( lwxios ) CALL iom_set_rstw_var_active('wmask') 
    292          !IF( lwxios ) CALL iom_set_rstw_var_active('gdepw_n') 
    293          IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 
    294          IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 
    295          IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 
    296  
    297          IF( ln_rstart ) THEN 
    298             ! 
    299             ll_isfcpl = .TRUE. 
    300             ! 
    301             CALL isf_alloc_cpl() 
    302             ! 
    303             ! extrapolation tracer properties 
    304             CALL isfcpl_tra() 
    305             ! 
    306             ! correction of the horizontal divergence and associated temp. and salt content flux 
    307             CALL isfcpl_vol() 
    308             ! 
    309             ! apply the 'conservation' method 
    310             IF ( ln_isfcpl_cons )  THEN 
    311                ll_isfcpl_cons = .TRUE. 
    312                CALL isfcpl_cons() 
     281         ! 
     282         !--------------------------------------------------------------------------------------------------------------------- 
     283         ! initialisation ice sheet coupling 
     284         IF( ln_isfcpl ) THEN 
     285            !  
     286            ! prepare writing restart 
     287            IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
     288            IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 
     289            IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 
     290            IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 
     291            IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 
     292            ! 
     293            IF( ln_rstart ) THEN 
     294               ! 
     295               CALL isf_alloc_cpl() 
     296               ! 
     297               ! extrapolation tracer properties 
     298               CALL isfcpl_tra() 
     299               ! 
     300               ! correction of the horizontal divergence and associated temp. and salt content flux 
     301               CALL isfcpl_vol() 
     302               ! 
     303               ! apply the 'conservation' method 
     304               IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 
     305               ! 
     306               ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
     307               !           - decide how to manage thickness level change in conservation 
     308               ! 
     309               tsb    (:,:,:,:) = tsn (:,:,:,:) 
     310               sshb   (:,:)     = sshn(:,:) 
     311               ub     (:,:,:)   = un(:,:,:) 
     312               vb     (:,:,:)   = vn(:,:,:) 
     313               ! 
    313314            END IF 
    314315            ! 
    315             ! Need to include in the cpl cons the isfrst_cpl_div contribution 
    316             ! decide how to manage thickness level change in conservation 
    317             ! 
    318             tsb    (:,:,:,:) = tsn (:,:,:,:) 
    319             sshb   (:,:)     = sshn(:,:) 
    320             ! 
    321          END IF 
     316         END IF 
     317         ! 
    322318      END IF 
    323319          
Note: See TracChangeset for help on using the changeset viewer.