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 7672 for branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2017-02-13T10:27:46+01:00 (7 years ago)
Author:
jcastill
Message:

Further changes to remove the UM dependency in case of a coupled run, so that ocean can also run in coupled mode with a wave model only: until now, if running in forced/coupled mode (ln_mixcpl), the program expected forcing files and coupling fields from the atmosphere, and they were 'merged' together using a coupling map; if the coupling map was not provided, the coupling fields overwrote the input fields even if they were not actually coupled and did not have any valid information. If we were coupling to a wave model and not an atmosphere model, the forcing fields read from file were being overwritten but the atmosphere coupling fields, which did not contain any valid information.

Now, it is possible to couple in real mixed mode, where the fields can independently be read either from forcing files or from coupling (ocean coupled to an atmosphere model, a wave model, or both), and the coupling mapping is only needed if a field if both provided via coupling and a forcing file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r7481 r7672  
    10961096         ! 
    10971097         IF( ln_mixcpl ) THEN 
    1098             utau(:,:) = utau(:,:) * xcplmask(:,:,0) + frcv(jpr_otx1)%z3(:,:,1) * zmsk(:,:) 
    1099             vtau(:,:) = vtau(:,:) * xcplmask(:,:,0) + frcv(jpr_oty1)%z3(:,:,1) * zmsk(:,:) 
    1100             taum(:,:) = taum(:,:) * xcplmask(:,:,0) + frcv(jpr_taum)%z3(:,:,1) * zmsk(:,:) 
    1101             wndm(:,:) = wndm(:,:) * xcplmask(:,:,0) + frcv(jpr_w10m)%z3(:,:,1) * zmsk(:,:) 
    1102          ELSE 
     1098            IF( srcv(jpr_otx1)%laction ) THEN 
     1099               utau(:,:) = utau(:,:) * xcplmask(:,:,0) + frcv(jpr_otx1)%z3(:,:,1) * zmsk(:,:) 
     1100               vtau(:,:) = vtau(:,:) * xcplmask(:,:,0) + frcv(jpr_oty1)%z3(:,:,1) * zmsk(:,:) 
     1101            ENDIF 
     1102            IF( srcv(jpr_taum)%laction .OR. (.NOT.srcv(jpr_taum)%laction .AND. srcv(jpr_otx1)%laction .AND. llnewtx ))   & 
     1103               taum(:,:) = taum(:,:) * xcplmask(:,:,0) + frcv(jpr_taum)%z3(:,:,1) * zmsk(:,:) 
     1104            IF( srcv(jpr_w10m)%laction .OR. (.NOT.srcv(jpr_w10m)%laction .AND. llnewtau .AND.                            & 
     1105               (srcv(jpr_taum)%laction .OR. (.NOT.srcv(jpr_taum)%laction .AND. srcv(jpr_otx1)%laction .AND. llnewtx )))) & 
     1106               wndm(:,:) = wndm(:,:) * xcplmask(:,:,0) + frcv(jpr_w10m)%z3(:,:,1) * zmsk(:,:) 
     1107         ELSE IF( ll_purecpl ) THEN 
    11031108            utau(:,:) = frcv(jpr_otx1)%z3(:,:,1) 
    11041109            vtau(:,:) = frcv(jpr_oty1)%z3(:,:,1) 
     
    12421247               CALL ctl_stop( 'sbc_cpl_rcv: wrong definition of sn_rcv_emp%cldes' ) 
    12431248            END SELECT 
    1244          ELSE 
     1249         ELSE IF( ll_purecpl ) THEN 
    12451250            zemp(:,:) = 0._wp 
    12461251         ENDIF 
     
    12501255         IF( srcv(jpr_cal)%laction )     zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 
    12511256          
    1252          IF( ln_mixcpl ) THEN   ;   emp(:,:) = emp(:,:) * xcplmask(:,:,0) + zemp(:,:) * zmsk(:,:) 
    1253          ELSE                   ;   emp(:,:) =                              zemp(:,:) 
     1257         IF( ln_mixcpl .AND. ( srcv(jpr_oemp)%laction .OR. srcv(jpr_rain)%laction )) THEN 
     1258                                         emp(:,:) = emp(:,:) * xcplmask(:,:,0) + zemp(:,:) * zmsk(:,:) 
     1259         ELSE IF( ll_purecpl ) THEN  ;   emp(:,:) =                              zemp(:,:) 
    12541260         ENDIF 
    12551261         ! 
     
    12661272            ENDIF 
    12671273         ENDIF 
    1268          IF( ln_mixcpl ) THEN   ;   qns(:,:) = qns(:,:) * xcplmask(:,:,0) + zqns(:,:) * zmsk(:,:) 
    1269          ELSE                   ;   qns(:,:) =                              zqns(:,:) 
     1274         IF( ln_mixcpl .AND. ( srcv(jpr_qnsoce)%laction .OR. srcv(jpr_qnsmix)%laction )) THEN 
     1275                                          qns(:,:) = qns(:,:) * xcplmask(:,:,0) + zqns(:,:) * zmsk(:,:) 
     1276         ELSE IF( ll_purecpl ) THEN   ;   qns(:,:) =                              zqns(:,:) 
    12701277         ENDIF 
    12711278 
     
    12761283         ENDIF 
    12771284         IF( ln_dm2dc .AND. ln_cpl )   zqsr(:,:) = sbc_dcy( zqsr )   ! modify qsr to include the diurnal cycle 
    1278          IF( ln_mixcpl ) THEN   ;   qsr(:,:) = qsr(:,:) * xcplmask(:,:,0) + zqsr(:,:) * zmsk(:,:) 
    1279          ELSE                   ;   qsr(:,:) =                              zqsr(:,:) 
     1285         IF( ln_mixcpl .AND. ( srcv(jpr_qsroce)%laction .OR. srcv(jpr_qsrmix)%laction )) THEN 
     1286                                          qsr(:,:) = qsr(:,:) * xcplmask(:,:,0) + zqsr(:,:) * zmsk(:,:) 
     1287         ELSE IF( ll_purecpl ) THEN   ;   qsr(:,:) =                              zqsr(:,:) 
    12801288         ENDIF 
    12811289         ! 
Note: See TracChangeset for help on using the changeset viewer.