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 2798 for branches/2011/dev_r2784_CMCC1_topbfm – NEMO

Ignore:
Timestamp:
2011-07-11T16:18:18+02:00 (13 years ago)
Author:
vichi
Message:

Added initial coupling with BFM

Location:
branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90

    r2715 r2798  
    6565      !!--------------------------------------------------------------------- 
    6666      !                                         ! ====================== ! 
    67       IF( kt == nit000 ) THEN                   !  First call kt=nit000  ! 
    68          !                                      ! ====================== ! 
    69          ! set file information 
    70          cn_dir = './'        ! directory in which the model is executed 
    71          ! ... default values (NB: frequency positive => hours, negative => months) 
    72          !             !   file    ! frequency !  variable  ! time intep !  clim  ! 'yearly' or ! weights  ! rotation   ! 
    73          !             !   name    !  (hours)  !   name     !   (T/F)    !  (T/F) !  'monthly'  ! filename ! pairs      !  
    74          sn_ice = FLD_N('ice_cover',    -1    ,  'ice_cov' ,  .true.    , .true. ,   'yearly'  , ''       , ''         ) 
    75  
    76          REWIND ( numnam )               ! ... read in namlist namiif 
    77          READ   ( numnam, namsbc_iif ) 
    78  
    79          ALLOCATE( sf_ice(1), STAT=ierror ) 
    80          IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ice_if: unable to allocate sf_ice structure' ) 
    81          ALLOCATE( sf_ice(1)%fnow(jpi,jpj,1) ) 
    82          IF( sn_ice%ln_tint )   ALLOCATE( sf_ice(1)%fdta(jpi,jpj,1,2) ) 
    83  
    84          ! fill sf_ice with sn_ice and control print 
    85          CALL fld_fill( sf_ice, (/ sn_ice /), cn_dir, 'sbc_ice_if', 'ice-if sea-ice model', 'namsbc_iif' ) 
    86          ! 
    87       ENDIF 
    88  
    89       CALL fld_read( kt, nn_fsbc, sf_ice )           ! Read input fields and provides the 
    90       !                                              ! input fields at the current time-step 
    9167       
    9268      IF( MOD( kt-1, nn_fsbc) == 0 ) THEN 
     
    10480               ! 
    10581               zt_fzp  = fr_i(ji,jj)                        ! freezing point temperature 
    106                zfr_obs = sf_ice(1)%fnow(ji,jj,1)            ! observed ice cover 
    10782               !                                            ! ocean ice fraction (0/1) from the freezing point temperature 
    10883               IF( sst_m(ji,jj) <= zt_fzp ) THEN   ;   fr_i(ji,jj) = 1.e0 
     
    11085               ENDIF 
    11186 
     87          zfr_obs = fr_i(ji,jj)   
    11288               tn(ji,jj,1) = MAX( tn(ji,jj,1), zt_fzp )     ! avoid over-freezing point temperature 
    11389 
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r2784 r2798  
    5858   REAL(wp) ::   r1_rau0   ! = 1 / rau0  
    5959 
    60    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_rnf       ! structure: river runoff (file information, fields read) 
     60   TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:) ::   sf_rnf       ! structure: river runoff (file information, fields read) 
    6161   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_s_rnf     ! structure: river runoff salinity (file information, fields read)   
    6262   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_t_rnf     ! structure: river runoff temperature (file information, fields read)   
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    r2715 r2798  
    2626   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   etot3   !: light absortion coefficient 
    2727 
    28 #if defined key_top && defined key_pisces 
     28#if defined key_top && (defined key_pisces || defined key_bfm) 
    2929   !!---------------------------------------------------------------------- 
    3030   !!   'key_top'   &   'key_pisces'                       PISCES bio-model           
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/TOP_SRC/par_trc.F90

    r2528 r2798  
    1717   USE par_cfc       ! CFC 11 and 12 tracers 
    1818   USE par_my_trc    ! user defined passive tracers 
    19  
     19   USE par_bfm       ! BFM biogeochemical tracers 
     20  
    2021   IMPLICIT NONE 
    2122 
    2223   ! Passive tracers : Total size 
    2324   ! ---------------               ! total number of passive tracers, of 2d and 3d output and trend arrays 
    24    INTEGER, PUBLIC,  PARAMETER ::   jptra    =  jp_lobster    + jp_pisces     + jp_cfc     + jp_c14b    + jp_my_trc 
    25    INTEGER, PUBLIC,  PARAMETER ::   jpdia2d  =  jp_lobster_2d + jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d + jp_my_trc_2d 
    26    INTEGER, PUBLIC,  PARAMETER ::   jpdia3d  =  jp_lobster_3d + jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d + jp_my_trc_3d 
     25   INTEGER, PUBLIC,  PARAMETER ::   jptra    =  jp_lobster    + jp_pisces     + jp_cfc     + jp_c14b    + jp_my_trc + jp_bfm 
     26   INTEGER, PUBLIC,  PARAMETER ::   jpdia2d  =  jp_lobster_2d + jp_pisces_2d  + jp_cfc_2d  + jp_c14b_2d + jp_my_trc_2d + jp_bfm_2d 
     27   INTEGER, PUBLIC,  PARAMETER ::   jpdia3d  =  jp_lobster_3d + jp_pisces_3d  + jp_cfc_3d  + jp_c14b_3d + jp_my_trc_3d + jp_bfm_3d 
    2728   !                     ! total number of sms diagnostic arrays 
    28    INTEGER, PUBLIC,  PARAMETER ::   jpdiabio = jp_lobster_trd + jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd 
     29   INTEGER, PUBLIC,  PARAMETER ::   jpdiabio = jp_lobster_trd + jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd +jp_bfm_trd 
    2930    
    3031   !  1D configuration ("key_c1d") 
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r2715 r2798  
    2525   USE trcini_c14b     ! C14 bomb initialisation 
    2626   USE trcini_my_trc   ! MY_TRC   initialisation 
     27#if defined key_bfm 
     28   USE par_bfm 
     29#endif 
    2730   USE trcdta    
    2831   USE daymod 
     
    9497      ENDIF 
    9598 
    96       IF( ln_dm2dc .AND. ( lk_pisces .OR. lk_lobster ) )    & 
    97          &       CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES or LOBSTER ' ) 
     99      IF( ln_dm2dc .AND. ( lk_pisces .OR. lk_lobster .OR. lk_bfm) )    & 
     100         &       CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES or LOBSTER or BFM ' ) 
    98101 
    99102      IF( nn_cla == 1 )   & 
     
    118121      IF( lk_my_trc  ) THEN   ;   CALL trc_ini_my_trc       ! MY_TRC  tracers 
    119122      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used' 
     123      ENDIF 
     124 
     125      IF( lk_bfm     ) THEN   ;   CALL trc_ini_bfm          ! BFM  tracers 
     126      ELSE                    ;   IF(lwp) WRITE(numout,*) '          BFM not used' 
    120127      ENDIF 
    121128 
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r2715 r2798  
    2626   USE trcnam_c14b       ! C14 SMS namelist 
    2727   USE trcnam_my_trc     ! MY_TRC SMS namelist 
     28   USE trcnam_bfm        ! BFM namelist  
    2829   USE trdmod_trc_oce 
    2930 
     
    189190      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used' 
    190191      ENDIF 
     192       
     193      IF( lk_bfm  ) THEN      ;   CALL trc_nam_bfm         ! BFM  tracers 
     194      ELSE                    ;   IF(lwp) WRITE(numout,*) '          BFM not used' 
     195      ENDIF 
    191196      ! 
    192197   END SUBROUTINE trc_nam 
  • branches/2011/dev_r2784_CMCC1_topbfm/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r2528 r2798  
    1111   !!---------------------------------------------------------------------- 
    1212   USE oce_trc          ! ocean dynamics and active tracers variables 
     13#if ! defined key_bfm 
    1314   USE trc 
    1415   USE trctrp           ! passive tracers transport 
     
    2021   USE trdmod_trc_oce 
    2122   USE trdmld_trc 
     23#else 
     24   USE api_bfm, ONLY: bio_calc 
     25   USE par_bfm 
     26#ifdef key_obc 
     27   USE trcobcdta_bfm 
     28#endif 
     29#endif 
    2230   USE iom 
    2331   USE in_out_manager 
     
    4957      !!------------------------------------------------------------------- 
    5058 
     59#if defined key_bfm 
     60   !--------------------------------------------- 
     61   ! Check the main BFM flag 
     62   !--------------------------------------------- 
     63      IF (bio_calc) THEN 
     64 
     65                             CALL trc_bfm( kt )           ! main call to BFM 
     66 
     67                             CALL trc_trp_bfm( kt )       ! transport of BFM tracers 
     68 
     69                             CALL trc_dia_bfm( kt )       ! diagnostic output for BFM 
     70      END IF 
     71#else 
     72 
    5173      IF( MOD( kt - 1 , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step 
    5274         ! 
     
    7193         ! 
    7294      ENDIF 
     95#endif 
    7396 
    7497   END SUBROUTINE trc_stp 
Note: See TracChangeset for help on using the changeset viewer.