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

Ignore:
Timestamp:
2013-11-04T12:51:55+01:00 (11 years ago)
Author:
cetlod
Message:

merge in dev_LOCEAN_2013, the 1st development branch dev_r3853_CNRS9_Confsetting, from its starting point ( r3853 ) on the trunk: see ticket #1169

File:
1 edited

Legend:

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

    r3625 r4147  
    104104      INTEGER  :: ifpr     ! dummy loop indice 
    105105      INTEGER  :: jj,ji    ! dummy loop arguments 
     106      INTEGER  ::   ios    ! Local integer output status for namelist read 
    106107      REAL(wp) :: act_hour 
    107108      !!-------------------------------------------------------------------- 
     
    127128      IF( kt == nit000 ) THEN                   !  First call kt=nit000  ! 
    128129         !                                      ! ====================== ! 
    129       ALLOCATE( sh_now(jpi,jpj), catm(jpi,jpj), alonl(jpi,jpj), alatl(jpi,jpj),     & 
     130         ALLOCATE( sh_now(jpi,jpj), catm(jpi,jpj), alonl(jpi,jpj), alatl(jpi,jpj),     & 
    130131         &        gsst(jpi,jpj),  qbw(jpi,jpj),    ha(jpi,jpj),  elat(jpi,jpj),     & 
    131132         &        evap(jpi,jpj), STAT=ierror ) 
    132133 
    133134         IF( ierror /= 0 )   CALL ctl_warn('sbc_blk_mfs: failed to allocate arrays') 
     135 
     136         REWIND( numnam_ref )              ! Namelist namsbc_msf in reference namelist : MFS files 
     137         READ  ( numnam_ref, namsbc_mfs, IOSTAT = ios, ERR = 901) 
     138901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_mfs in reference namelist', lwp ) 
     139 
     140         REWIND( numnam_cfg )              ! Namelist namsbc_msf in configuration namelist : MFS files 
     141         READ  ( numnam_cfg, namsbc_mfs, IOSTAT = ios, ERR = 902 ) 
     142902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_mfs in configuration namelist', lwp ) 
     143         WRITE ( numond, namsbc_mfs ) 
     144         ! 
     145         ! store namelist information in an array 
     146         slf_i(jp_wndi) = sn_wndi   ;   slf_i(jp_wndj) = sn_wndj 
     147         slf_i(jp_clc ) = sn_clc    ;   slf_i(jp_msl ) = sn_msl 
     148         slf_i(jp_tair) = sn_tair   ;   slf_i(jp_rhm)  = sn_rhm 
     149         slf_i(jp_prec) = sn_prec   ;   
     150         ! 
     151         ALLOCATE( sf(jpfld), STAT=ierror )         ! set sf structure 
     152         IF( ierror > 0 ) THEN 
     153            CALL ctl_stop( 'sbc_blk_mfs: unable to allocate sf structure' )   ;   RETURN 
     154         ENDIF 
     155         DO ifpr= 1, jpfld 
     156            ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) ) 
     157            IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 
     158         END DO 
     159         ! fill sf with slf_i and control print 
     160         CALL fld_fill( sf, slf_i, cn_dir,'sbc_blk_mfs','bulk formulation for ocean SBC', 'namsbc_mfs' ) 
    134161            ! 
    135             ! set file information (default values) 
    136             cn_dir = './'       ! directory in which the model is executed 
    137             ! 
    138             ! (NB: frequency positive => hours, negative => months) 
    139             !            !    file     ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   ! 
    140             !            !    name     !  (hours)  !   name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      ! 
    141             sn_wndi = FLD_N( 'ecmwf'   ,    24     ,  'u10'     ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    142             sn_wndj = FLD_N( 'ecmwf'   ,    24     ,  'v10'     ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    143             sn_clc  = FLD_N( 'ecmwf'   ,    24     ,  'clc'     ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    144             sn_msl  = FLD_N( 'ecmwf'   ,    24     ,  'msl'     ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    145             sn_tair = FLD_N( 'ecmwf'   ,    24     ,  't2'      ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    146             sn_rhm  = FLD_N( 'ecmwf'   ,    24     ,  'rh'      ,  .false.   , .false. ,   'daily'   , ''       , ''         ) 
    147             sn_prec = FLD_N( 'precip_cmap' ,  -1   ,  'precip'  ,  .true.    ,  .true. ,   'yearly'  , ''       , ''         ) 
    148             ! 
    149             REWIND( numnam )                    ! ... read in namlist namsbc_mfs 
    150             READ  ( numnam, namsbc_mfs ) 
    151             ! 
    152             ! store namelist information in an array 
    153             slf_i(jp_wndi) = sn_wndi   ;   slf_i(jp_wndj) = sn_wndj 
    154             slf_i(jp_clc ) = sn_clc    ;   slf_i(jp_msl ) = sn_msl 
    155             slf_i(jp_tair) = sn_tair   ;   slf_i(jp_rhm)  = sn_rhm 
    156             slf_i(jp_prec) = sn_prec   ;   
    157             ! 
    158             ALLOCATE( sf(jpfld), STAT=ierror )         ! set sf structure 
    159             IF( ierror > 0 ) THEN 
    160                CALL ctl_stop( 'sbc_blk_mfs: unable to allocate sf structure' )   ;   RETURN 
    161             ENDIF 
    162             DO ifpr= 1, jpfld 
    163                ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) ) 
    164                IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 
    165             END DO 
    166             ! fill sf with slf_i and control print 
    167             CALL fld_fill( sf, slf_i, cn_dir,'sbc_blk_mfs','bulk formulation for ocean SBC', 'namsbc_mfs' ) 
    168             ! 
    169          ENDIF 
     162      ENDIF 
    170163 
    171164         CALL fld_read( kt, nn_fsbc, sf )                   ! input fields provided at the current time-step 
Note: See TracChangeset for help on using the changeset viewer.