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 4205 for branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90 – NEMO

Ignore:
Timestamp:
2013-11-14T18:02:06+01:00 (10 years ago)
Author:
clem
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r4161 r4205  
    153153      CALL wrk_alloc( jpi,jpj,jpl, zalb_ice_os, zalb_ice_cs ) 
    154154 
    155       IF ( ln_cpl .OR. ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    156          CALL wrk_alloc( jpi,jpj,jpl, zalb_ice) 
    157       END IF 
    158       IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    159          CALL wrk_alloc( jpi,jpj, ztem_ice_all, zalb_ice_all, z_qsr_ice_all, z_qns_ice_all, z_qla_ice_all, z_dqns_ice_all, z_dqla_ice_all) 
    160       ENDIF 
    161  
     155#if defined key_coupled 
     156      IF ( ln_cpl .OR. ln_iceflx_ave .OR. ln_iceflx_linear ) CALL wrk_alloc( jpi,jpj,jpl, zalb_ice) 
     157      IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) & 
     158         &   CALL wrk_alloc( jpi,jpj, ztem_ice_all, zalb_ice_all, z_qsr_ice_all, z_qns_ice_all, z_qla_ice_all, z_dqns_ice_all, z_dqla_ice_all) 
     159#endif 
    162160 
    163161      IF( kt == nit000 ) THEN 
     
    169167         ! 
    170168         IF( ln_nicep ) THEN      ! control print at a given point 
    171             jiindx = 15   ;   jjindx = 46 
     169            jiindx = 6   ;   jjindx = 47 
    172170            WRITE(numout,*) ' The debugging point is : jiindx : ',jiindx, ' jjindx : ',jjindx 
    173171         ENDIF 
     
    193191         IF ( ln_cpl ) zalb_ice (:,:,:) = 0.5 * ( zalb_ice_cs (:,:,:) +  zalb_ice_os (:,:,:) ) 
    194192          
     193#if defined key_coupled 
    195194         IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    196195            ! 
     
    200199            ! 
    201200         ENDIF 
    202                                                      ! Bulk formulea - provides the following fields: 
     201#endif 
     202                                               ! Bulk formulea - provides the following fields: 
    203203         ! utau_ice, vtau_ice : surface ice stress                     (U- & V-points)   [N/m2] 
    204204         ! qsr_ice , qns_ice  : solar & non solar heat flux over ice   (T-point)         [W/m2] 
     
    238238 
    239239         ! Average over all categories 
     240#if defined key_coupled 
    240241         IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    241242 
     
    267268            END IF 
    268269         END IF 
    269  
     270#endif 
    270271         !                                           !----------------------! 
    271272         !                                           ! LIM-3  time-stepping ! 
     
    283284         old_smv_i(:,:,:)   = smv_i(:,:,:)     ! salt content 
    284285         old_oa_i (:,:,:)   = oa_i (:,:,:)     ! areal age content 
    285  
     286         ! 
     287         old_u_ice(:,:) = u_ice(:,:) 
     288         old_v_ice(:,:) = v_ice(:,:) 
    286289         !                                           ! intialisation to zero    !!gm is it truly necessary ??? 
    287290         d_a_i_thd  (:,:,:)   = 0._wp   ;   d_a_i_trp  (:,:,:)   = 0._wp 
     
    292295         d_smv_i_thd(:,:,:)   = 0._wp   ;   d_smv_i_trp(:,:,:)   = 0._wp 
    293296         d_oa_i_thd (:,:,:)   = 0._wp   ;   d_oa_i_trp (:,:,:)   = 0._wp 
     297         ! 
     298         d_u_ice_dyn(:,:) = 0._wp 
     299         d_v_ice_dyn(:,:) = 0._wp 
    294300         ! 
    295301         sfx    (:,:) = 0._wp   ;   sfx_thd  (:,:) = 0._wp 
     
    373379                          CALL lim_wri( 1  )              ! Ice outputs  
    374380!clem # endif 
    375          IF( kt == nit000 )   CALL iom_close( numrir )  ! clem: close input ice restart file 
     381         IF( kt == nit000 .AND. ln_rstart )   & 
     382            &             CALL iom_close( numrir )        ! clem: close input ice restart file 
     383         ! 
    376384         IF( lrst_ice )   CALL lim_rst_write( kt )        ! Ice restart file  
    377385                          CALL lim_var_glo2eqv            ! ??? 
     
    392400      ! 
    393401      CALL wrk_dealloc( jpi,jpj,jpl, zalb_ice_os, zalb_ice_cs ) 
    394       IF ( ln_cpl .OR. ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    395          CALL wrk_dealloc( jpi,jpj,jpl, zalb_ice) 
    396       END IF 
    397       IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) THEN 
    398          CALL wrk_dealloc( jpi,jpj, ztem_ice_all, zalb_ice_all, z_qsr_ice_all, z_qns_ice_all, z_qla_ice_all, z_dqns_ice_all, z_dqla_ice_all) 
    399       ENDIF 
     402 
     403#if defined key_coupled 
     404      IF ( ln_cpl .OR. ln_iceflx_ave .OR. ln_iceflx_linear ) CALL wrk_dealloc( jpi,jpj,jpl, zalb_ice) 
     405      IF ( ln_iceflx_ave .OR. ln_iceflx_linear ) & 
     406         &    CALL wrk_dealloc( jpi,jpj, ztem_ice_all, zalb_ice_all, z_qsr_ice_all, z_qns_ice_all, z_qla_ice_all, z_dqns_ice_all, z_dqla_ice_all) 
     407#endif 
    400408      ! 
    401409      IF( nn_timing == 1 )  CALL timing_stop('sbc_ice_lim') 
Note: See TracChangeset for help on using the changeset viewer.