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 11345 for NEMO/branches/UKMO/r8395_cpl-pressure – NEMO

Ignore:
Timestamp:
2019-07-25T10:55:18+02:00 (5 years ago)
Author:
jcastill
Message:

Some fixes to the pressure correction, when the pressure is received by coupling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r10803 r11345  
    11381138      !  
    11391139      IF( srcv(jpr_mslp)%laction ) THEN                    ! UKMO SHELF effect of atmospheric pressure on SSH  
    1140           IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields  
    1141  
    1142           !                                                  !* update the reference atmospheric pressure (if necessary)  
    1143           IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea 
    1144  
    1145           ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau  ! equivalent ssh (inverse barometer)  
    1146           apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1)                        !atmospheric pressure  
    1147           ! 
    1148           CALL iom_put( "ssh_ib", ssh_ib )                                  !* output the inverse barometer ssh 
    1149           !                                         ! ---------------------------------------- !  
    1150           IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    !  
    1151              !                                      ! ---------------------------------------- !  
    1152              !* Restart: read in restart file  
    1153              IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN  
    1154                 IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file'  
    1155                 CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh  
    1156              ELSE                                         !* no restart: set from nit000 values  
    1157                 IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values'  
    1158                 ssh_ibb(:,:) = ssh_ib(:,:)  
     1140          IF( ln_apr_dyn ) THEN 
     1141             IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields  
     1142     
     1143             !                                                  !* update the reference atmospheric pressure (if necessary)  
     1144             IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea 
     1145     
     1146             ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau  ! equivalent ssh (inverse barometer)  
     1147             apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1)                        !atmospheric pressure  
     1148             ! 
     1149             CALL iom_put( "ssh_ib", ssh_ib )                                  !* output the inverse barometer ssh 
     1150             !                                         ! ---------------------------------------- !  
     1151             IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    !  
     1152                !                                      ! ---------------------------------------- !  
     1153                !* Restart: read in restart file  
     1154                IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN  
     1155                   IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file'  
     1156                   CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh  
     1157                ELSE                                         !* no restart: set from nit000 values  
     1158                   IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values'  
     1159                   ssh_ibb(:,:) = ssh_ib(:,:)  
     1160                ENDIF  
    11591161             ENDIF  
    1160           ENDIF  
    1161           !                                         ! ---------------------------------------- !  
    1162           IF( lrst_oce ) THEN                       !      Write in the ocean restart file    !  
    1163              !                                      ! ---------------------------------------- !  
    1164              IF(lwp) WRITE(numout,*)  
    1165              IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp  
    1166              IF(lwp) WRITE(numout,*) '~~~~'  
    1167              CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib )  
    1168           ENDIF  
     1162             !                                         ! ---------------------------------------- !  
     1163             IF( lrst_oce ) THEN                       !      Write in the ocean restart file    !  
     1164                !                                      ! ---------------------------------------- !  
     1165                IF(lwp) WRITE(numout,*)  
     1166                IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp  
     1167                IF(lwp) WRITE(numout,*) '~~~~'  
     1168                CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib )  
     1169             ENDIF  
     1170          ENDIF 
    11691171      
    11701172          ! Update mean ssh  
    1171           CALL sbc_ssm_cpl( kt ) 
     1173          IF( nn_components /= jp_iam_sas ) CALL sbc_ssm_cpl( kt ) 
    11721174      END IF  
    11731175      ! 
Note: See TracChangeset for help on using the changeset viewer.