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 8597 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerst.F90 – NEMO

Ignore:
Timestamp:
2017-10-05T16:44:46+02:00 (7 years ago)
Author:
clem
Message:

first step to make melt ponds compliant with the new code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerst.F90

    r8592 r8597  
    189189      !! ** purpose  :   read restart file 
    190190      !!---------------------------------------------------------------------- 
    191       INTEGER  :: jk, jl 
    192       REAL(wp) :: zfice, ziter 
     191      INTEGER  ::   jk, jl 
     192      INTEGER  ::   id1            ! local integer 
     193      REAL(wp) ::   zfice, ziter 
    193194      REAL(wp), DIMENSION(jpi,jpj) ::   z2d 
    194195      CHARACTER(len=25) ::   znam 
     
    244245      END DO 
    245246 
    246       DO jl = 1, jpl  
    247          WRITE(zchar,'(I2.2)') jl 
    248          znam = 'a_ip'//'_htc'//zchar 
    249          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    250          a_ip(:,:,jl) = z2d(:,:) 
    251          znam = 'v_ip'//'_htc'//zchar 
    252          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    253          v_ip(:,:,jl) = z2d(:,:) 
    254       END DO 
     247      id1 = iom_varid( numrir, 'a_ip_htc01' , ldstop = .FALSE. ) 
     248      IF( id1 > 0 ) THEN                       ! fields exist (melt ponds) 
     249         DO jl = 1, jpl  
     250            WRITE(zchar,'(I2.2)') jl 
     251            znam = 'a_ip'//'_htc'//zchar 
     252            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     253            a_ip(:,:,jl) = z2d(:,:) 
     254            znam = 'v_ip'//'_htc'//zchar 
     255            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     256            v_ip(:,:,jl) = z2d(:,:) 
     257         END DO 
     258      ELSE                                     ! start from rest 
     259         IF(lwp) WRITE(numout,*) '   ==>>   previous run without melt ponds output then set it' 
     260         a_ip(:,:,:) = 0._wp 
     261         v_ip(:,:,:) = 0._wp 
     262      ENDIF 
    255263 
    256264      DO jl = 1, jpl  
Note: See TracChangeset for help on using the changeset viewer.