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 2068 for branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/traqsr.F90 – NEMO

Ignore:
Timestamp:
2010-09-06T17:56:51+02:00 (14 years ago)
Author:
mlelod
Message:

ticket: #663 ensuring restartability and conservation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/traqsr.F90

    r1975 r2068  
    112112         ztrdt(:,:,:) = ta(:,:,:)  
    113113         ztrds(:,:,:) = 0.e0 
     114      ENDIF 
     115 
     116      !                                           ! ---------------------------------------- ! 
     117      !                                           !          Swap of forcing field           ! 
     118      !                                           ! ---------------------------------------- ! 
     119      IF( kt /= nit000 ) qsr_trd_hc_b(:,:,:) = qsr_trd_hc_n(:,:,:) 
     120      !                                           ! ---------------------------------------- ! 
     121      IF( kt == nit000 ) THEN                     !   set the forcing field at nit000 - 1    ! 
     122         !                                        ! ---------------------------------------- ! 
     123         IF( ln_rstart .AND.    &                               !* Restart: read in restart file 
     124            & iom_varid( numror, 'qsr_trd_hc_b', ldstop = .FALSE. ) > 0 ) THEN  
     125            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file' 
     126            CALL iom_get( numror, jpdom_autoglo, 'qsr_trd_hc_b', qsr_trd_hc_b )   ! before heat content trend due to Qsr flux 
     127         ENDIF 
    114128      ENDIF 
    115129 
     
    225239            END DO 
    226240         END DO 
     241      ENDIF 
     242 
     243      !                                            ! ---------------------------------------- ! 
     244      IF( lrst_oce ) THEN                          !      Write in the ocean restart file     ! 
     245         !                                         ! ---------------------------------------- ! 
     246         IF(lwp) WRITE(numout,*) 
     247         IF(lwp) WRITE(numout,*) 'qsr : penetrative solar radiation forcing field written in ocean restart file ',   & 
     248            &                    'at it= ', kt,' date= ', ndastp 
     249         IF(lwp) WRITE(numout,*) '~~~~' 
     250         CALL iom_rstput( kt, nitrst, numrow, 'qsr_trd_hc_b', qsr_trd_hc_n ) 
     251         ! 
    227252      ENDIF 
    228253 
Note: See TracChangeset for help on using the changeset viewer.