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 7515 for branches/2015/nemo_v3_6_STABLE/NEMOGCM – NEMO

Ignore:
Timestamp:
2016-12-21T11:14:38+01:00 (7 years ago)
Author:
timgraham
Message:

Minor changes so that sali_clim_ref.nc file is not needed with key_diaar5 unless variable sshthster is requested in iodef file

Location:
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90

    r7494 r7515  
    8686      !!-------------------------------------------------------------------- 
    8787      IF( nn_timing == 1 )   CALL timing_start('dia_ar5') 
     88 
     89      !Call to init moved to here so that we can call iom_use in the 
     90      !initialisation 
     91      IF( kt == nit000 )     CALL dia_ar5_init 
    8892  
    8993      CALL wrk_alloc( jpi , jpj              , zarea_ssh , zbotpres, pe ) 
     
    103107 
    104108      !                      
    105       ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh 
    106       ztsn(:,:,:,jp_sal) = sn0(:,:,:) 
    107       CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity 
    108       ! 
    109       zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice 
    110       DO jk = 1, jpkm1 
    111          zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk) 
    112       END DO 
    113       IF( .NOT.lk_vvl ) THEN 
    114          IF ( ln_isfcav ) THEN 
    115             DO ji=1,jpi 
    116                DO jj=1,jpj 
    117                   zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj) 
     109      IF( iom_use('sshthster')) THEN 
     110         ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh 
     111         ztsn(:,:,:,jp_sal) = sn0(:,:,:) 
     112         CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity 
     113         ! 
     114         zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice 
     115         DO jk = 1, jpkm1 
     116            zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk) 
     117         END DO 
     118         IF( .NOT.lk_vvl ) THEN 
     119            IF ( ln_isfcav ) THEN 
     120               DO ji=1,jpi 
     121                  DO jj=1,jpj 
     122                     zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj) 
     123                  END DO 
    118124               END DO 
    119             END DO 
    120          ELSE 
    121             zbotpres(:,:) = zbotpres(:,:) + sshn(:,:) * zrhd(:,:,1) 
     125            ELSE 
     126               zbotpres(:,:) = zbotpres(:,:) + sshn(:,:) * zrhd(:,:,1) 
     127            END IF 
    122128         END IF 
    123       END IF 
    124129      !                                          
    125       zarho = SUM( area(:,:) * zbotpres(:,:) )  
    126       IF( lk_mpp )   CALL mpp_sum( zarho ) 
    127       zssh_steric = - zarho / area_tot 
    128       CALL iom_put( 'sshthster', zssh_steric ) 
    129        
     130         zarho = SUM( area(:,:) * zbotpres(:,:) )  
     131         IF( lk_mpp )   CALL mpp_sum( zarho ) 
     132         zssh_steric = - zarho / area_tot 
     133         CALL iom_put( 'sshthster', zssh_steric ) 
     134      ENDIF 
    130135      !                                         ! steric sea surface height 
    131136      CALL eos( tsn, zrhd, zrhop, fsdept_n(:,:,:) )                 ! now in situ and potential density 
     
    273278      IF( lk_mpp )   CALL mpp_sum( vol0 ) 
    274279 
    275       CALL iom_open ( 'sali_ref_clim_monthly', inum ) 
    276       CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  ) 
    277       CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 ) 
    278       CALL iom_close( inum ) 
    279  
    280       sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )         
    281       sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:) 
    282       IF( ln_zps ) THEN               ! z-coord. partial steps 
    283          DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step) 
    284             DO ji = 1, jpi 
    285                ik = mbkt(ji,jj) 
    286                IF( ik > 1 ) THEN 
    287                   zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 
    288                   sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1) 
    289                ENDIF 
     280      IF( iom_use('sshthster')) THEN 
     281         CALL iom_open ( 'sali_ref_clim_monthly', inum ) 
     282         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  ) 
     283         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 ) 
     284         CALL iom_close( inum ) 
     285 
     286         sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )         
     287         sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:) 
     288         IF( ln_zps ) THEN               ! z-coord. partial steps 
     289            DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step) 
     290               DO ji = 1, jpi 
     291                  ik = mbkt(ji,jj) 
     292                  IF( ik > 1 ) THEN 
     293                     zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 
     294                     sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1) 
     295                  ENDIF 
     296               END DO 
    290297            END DO 
    291          END DO 
     298         ENDIF 
    292299      ENDIF 
    293300      ! 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r6204 r7515  
    462462      !                                     ! Diagnostics 
    463463      IF( lk_floats     )   CALL     flo_init   ! drifting Floats 
    464       IF( lk_diaar5     )   CALL dia_ar5_init   ! ar5 diag 
    465464                            CALL dia_ptr_init   ! Poleward TRansports initialization 
    466465      IF( lk_diadct     )   CALL dia_dct_init   ! Sections tranports 
Note: See TracChangeset for help on using the changeset viewer.