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

Ignore:
Timestamp:
2017-09-06T19:02:43+02:00 (7 years ago)
Author:
clem
Message:

changes in style - part5 - start changing init routines

File:
1 edited

Legend:

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

    r8486 r8505  
    3131   PRIVATE 
    3232 
    33    PUBLIC   ice_dia        ! routine called by icestp.F90 
    34    PUBLIC   ice_dia_init   ! routine called in icestp.F90 
     33   PUBLIC   ice_dia        ! called by icestp.F90 
     34   PUBLIC   ice_dia_init   ! called in icestp.F90 
    3535 
    3636   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   vol_loc_ini, sal_loc_ini, tem_loc_ini ! initial volume, salt and heat contents 
     
    162162      !!             - Compute coefficients for conversion 
    163163      !!--------------------------------------------------------------------------- 
    164       INTEGER            ::   ierror   ! local integer 
    165       !! 
    166       !!NAMELIST/namicehsb/ blabla 
     164      INTEGER            ::   ios, ierror   ! local integer 
     165      !! 
     166      NAMELIST/namicediag/ ln_limdiachk, ln_limdiahsb, ln_limctl, iiceprt, jiceprt   
    167167      !!---------------------------------------------------------------------- 
    168168      ! 
    169       !!REWIND ( numnam_ice )              ! Read Namelist namicehsb  
    170       !!READ   ( numnam_ice, namicehsb ) 
    171       ! 
    172       IF(lwp) THEN                   ! Control print 
     169      REWIND( numnam_ice_ref )      ! Namelist namicediag in reference namelist : Parameters for ice 
     170      READ  ( numnam_ice_ref, namicediag, IOSTAT = ios, ERR = 901) 
     171901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicediag in reference namelist', lwp ) 
     172 
     173      REWIND( numnam_ice_cfg )      ! Namelist namicediag in configuration namelist : Parameters for ice 
     174      READ  ( numnam_ice_cfg, namicediag, IOSTAT = ios, ERR = 902 ) 
     175902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicediag in configuration namelist', lwp ) 
     176      IF(lwm) WRITE ( numoni, namicediag ) 
     177      ! 
     178      IF(lwp) THEN                  ! control print 
    173179         WRITE(numout,*) 
    174          WRITE(numout,*) 'ice_dia_init : check the heat and salt budgets' 
    175          WRITE(numout,*) '~~~~~~~~~~~~' 
     180         WRITE(numout,*) 'ice_dia_init: ice diagnostics' 
     181         WRITE(numout,*) ' ~~~~~~~~~~~' 
     182         WRITE(numout,*) '   Namelist namicediag : ' 
     183         WRITE(numout,*) '      Diagnose online heat/mass/salt budget      ln_limdiachk = ', ln_limdiachk 
     184         WRITE(numout,*) '      Output          heat/mass/salt budget      ln_limdiahsb = ', ln_limdiahsb 
     185         WRITE(numout,*) '      control prints for a given grid point         ln_limctl = ', ln_limctl 
     186         WRITE(numout,*) '         chosen grid point position         (iiceprt,jiceprt) = (', iiceprt,',', jiceprt,')' 
    176187      ENDIF 
    177188      !       
    178       ALLOCATE( vol_loc_ini(jpi,jpj), sal_loc_ini(jpi,jpj), tem_loc_ini(jpi,jpj), STAT=ierror ) 
    179       IF( ierror > 0 )  THEN 
    180          CALL ctl_stop( 'ice_dia: unable to allocate vol_loc_ini' ) 
    181          RETURN 
    182       ENDIF 
    183       ! 
    184       CALL ice_dia_rst( 'READ' )  !* read or initialize all required files 
     189      IF( ln_limdiahsb ) THEN 
     190         ALLOCATE( vol_loc_ini(jpi,jpj), sal_loc_ini(jpi,jpj), tem_loc_ini(jpi,jpj), STAT=ierror ) 
     191         IF( ierror > 0 )  THEN 
     192            CALL ctl_stop( 'ice_dia: unable to allocate vol_loc_ini' ) 
     193            RETURN 
     194         ENDIF 
     195         ! 
     196         CALL ice_dia_rst( 'READ' )  !* read or initialize all required files 
     197      ENDIF 
    185198      ! 
    186199   END SUBROUTINE ice_dia_init 
Note: See TracChangeset for help on using the changeset viewer.