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 11432 – NEMO

Changeset 11432


Ignore:
Timestamp:
2019-08-09T18:26:00+02:00 (5 years ago)
Author:
csanchez
Message:

Added changes from Bijoy to set cpl_mslp in a namelist

Location:
branches/UKMO/r6232_coupling_CBIJ/NEMOGCM/NEMO/OPA_SRC/SBC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_coupling_CBIJ/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90

    r9259 r11432  
    2626    
    2727   !                                !!* namsbc_apr namelist (Atmospheric PRessure) * 
    28    LOGICAL, PUBLIC ::   cpl_mslp = .FALSE. ! Is the pressure read from coupling? 
     28   LOGICAL, PUBLIC ::   cpl_mslp     ! Is the pressure read from coupling?   !CBIJ 
    2929   LOGICAL, PUBLIC ::   ln_apr_obc   !: inverse barometer added to OBC ssh data  
    3030   LOGICAL, PUBLIC ::   ln_ref_apr   !: ref. pressure: global mean Patm (F) or a constant (F) 
     
    7070      TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read 
    7171      !! 
    72       NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 
     72      NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc, cpl_mslp   !CBIJ 
    7373      !!---------------------------------------------------------------------- 
    7474      ! 
  • branches/UKMO/r6232_coupling_CBIJ/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r9259 r11432  
    523523      IF( TRIM(sn_rcv_mslp%cldes  ) == 'coupled' ) THEN 
    524524         srcv(jpr_mslp)%laction = .TRUE. 
    525          cpl_mslp = .TRUE. 
     525!         cpl_mslp = .TRUE. CBIJ 
    526526      ENDIF 
    527527       
     
    11781178      !   
    11791179      IF( srcv(jpr_mslp)%laction ) THEN                    ! UKMO SHELF effect of atmospheric pressure on SSH   
    1180          IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields   
     1180         IF ( cpl_mslp) THEN  !CBIJ 
     1181            IF (ln_apr_dyn ) THEN  !CBIJ 
     1182            IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields   
    11811183       
    1182          !                                                  !* update the reference atmospheric pressure (if necessary) 
    1183          IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea 
    1184  
    1185          ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer)   
    1186          apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1) !atmospheric pressure   
    1187          ! 
    1188          CALL iom_put( "ssh_ib", ssh_ib )                                    !* output the inverse barometer ssh 
     1184            !                                                  !* update the reference atmospheric pressure (if necessary) 
     1185            IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea 
     1186 
     1187            ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer)   
     1188            apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1) !atmospheric pressure   
     1189            ! 
     1190            CALL iom_put( "ssh_ib", ssh_ib )                                    !* output the inverse barometer ssh 
    11891191       
    1190          !                                         ! ---------------------------------------- ! 
    1191          IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    ! 
    1192             !                                      ! ---------------------------------------- ! 
    1193             !* Restart: read in restart file 
    1194             IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
    1195                IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file' 
    1196                CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh 
    1197             ELSE                                         !* no restart: set from nit000 values 
    1198                IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values' 
    1199                ssh_ibb(:,:) = ssh_ib(:,:) 
     1192            !                                         ! ---------------------------------------- ! 
     1193            IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    ! 
     1194               !                                      ! ---------------------------------------- ! 
     1195               !* Restart: read in restart file 
     1196               IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
     1197                  IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file' 
     1198                  CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh 
     1199               ELSE                                         !* no restart: set from nit000 values 
     1200                  IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values' 
     1201                  ssh_ibb(:,:) = ssh_ib(:,:) 
     1202               ENDIF 
    12001203            ENDIF 
    1201          ENDIF 
    1202          !                                         ! ---------------------------------------- ! 
    1203          IF( lrst_oce ) THEN                       !      Write in the ocean restart file     ! 
    1204             !                                      ! ---------------------------------------- ! 
    1205             IF(lwp) WRITE(numout,*) 
    1206             IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 
    1207             IF(lwp) WRITE(numout,*) '~~~~' 
    1208             CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 
    1209          ENDIF 
    1210  
     1204            !                                         ! ---------------------------------------- ! 
     1205            IF( lrst_oce ) THEN                       !      Write in the ocean restart file     ! 
     1206               !                                      ! ---------------------------------------- ! 
     1207               IF(lwp) WRITE(numout,*) 
     1208               IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 
     1209               IF(lwp) WRITE(numout,*) '~~~~' 
     1210               CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 
     1211            ENDIF 
     1212         ENDIF 
    12111213         ! Update mean ssh 
    1212          CALL sbc_ssm_cpl( kt ) 
    1213       END IF   
     1214         IF( nn_components/=jp_iam_sas ) CALL sbc_ssm_cpl( kt ) 
     1215       ENDIF   
     1216      ENDIF   
    12141217      !  
    12151218      IF( ln_sdw ) THEN  ! Stokes Drift correction activated  
Note: See TracChangeset for help on using the changeset viewer.