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

Changeset 11343


Ignore:
Timestamp:
2019-07-25T10:46:51+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
  • branches/UKMO/r6232_HZG_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r9259 r11343  
    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   
    1181        
    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 
    1189        
    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(:,:) 
     1180         IF( ln_apr_dyn ) THEN 
     1181            IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields   
     1182          
     1183            !                                                  !* update the reference atmospheric pressure (if necessary) 
     1184            IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea 
     1185     
     1186            ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer)   
     1187            apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1) !atmospheric pressure   
     1188            ! 
     1189            CALL iom_put( "ssh_ib", ssh_ib )                                    !* output the inverse barometer ssh 
     1190          
     1191            !                                         ! ---------------------------------------- ! 
     1192            IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    ! 
     1193               !                                      ! ---------------------------------------- ! 
     1194               !* Restart: read in restart file 
     1195               IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
     1196                  IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file' 
     1197                  CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh 
     1198               ELSE                                         !* no restart: set from nit000 values 
     1199                  IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values' 
     1200                  ssh_ibb(:,:) = ssh_ib(:,:) 
     1201               ENDIF 
    12001202            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 ) 
     1203            !                                         ! ---------------------------------------- ! 
     1204            IF( lrst_oce ) THEN                       !      Write in the ocean restart file    ! 
     1205               !                                      ! ---------------------------------------- ! 
     1206               IF(lwp) WRITE(numout,*) 
     1207               IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 
     1208               IF(lwp) WRITE(numout,*) '~~~~' 
     1209               CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 
     1210            ENDIF 
    12091211         ENDIF 
    12101212 
    12111213         ! Update mean ssh 
    1212          CALL sbc_ssm_cpl( kt ) 
     1214         IF( nn_components /= jp_iam_sas ) CALL sbc_ssm_cpl( kt ) 
    12131215      END IF   
    12141216      !  
Note: See TracChangeset for help on using the changeset viewer.