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 7494 for branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90 – NEMO

Ignore:
Timestamp:
2016-12-14T10:02:43+01:00 (7 years ago)
Author:
timgraham
Message:

Addition of extra diagnostic outputs in CMIP6 data request. NB. Will require update to field_def file from shaconemo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r6228 r7494  
    9191    CHARACTER (LEN=32)           :: cvarLeff                    ! variable name for efficient Length scale 
    9292    INTEGER           ::   ios           ! Local integer output status for namelist read 
     93 
     94    REAL(wp), DIMENSION(:,:,:), POINTER :: zfwfisf3d, zqhcisf3d, zqlatisf3d 
     95    REAL(wp), DIMENSION(:,:  ), POINTER :: zqhcisf2d 
    9396      ! 
    9497      !!--------------------------------------------------------------------- 
     
    273276 
    274277         ! output 
    275          IF( iom_use('qisf'  ) )   CALL iom_put('qisf'  , qisf) 
    276          IF( iom_use('fwfisf') )   CALL iom_put('fwfisf', fwfisf * stbl(:,:) / soce ) 
     278         IF( iom_use('qlatisf' ) )   CALL iom_put('qlatisf', qisf) 
     279         IF( iom_use('fwfisf'  ) )   CALL iom_put('fwfisf' , fwfisf * stbl(:,:) / soce ) 
    277280 
    278281         ! if apply only on the trend and not as a volume flux (rdivisf = 0), fwfisf have to be set to 0 now 
     
    284287         CALL lbc_lnk(fwfisf(:,:)   ,'T',1.) 
    285288         CALL lbc_lnk(qisf(:,:)     ,'T',1.) 
     289 
     290!============================================================================================================================================= 
     291         IF ( iom_use('fwfisf3d') .OR. iom_use('qlatisf3d') .OR. iom_use('qhcisf3d') .OR. iom_use('qhcisf')) THEN 
     292            CALL wrk_alloc( jpi,jpj,jpk, zfwfisf3d, zqhcisf3d, zqlatisf3d ) 
     293            CALL wrk_alloc( jpi,jpj,     zqhcisf2d                        ) 
     294 
     295            zfwfisf3d(:,:,:) = 0.0_wp                         ! 3d ice shelf melting (kg/m2/s) 
     296            zqhcisf3d(:,:,:) = 0.0_wp                         ! 3d heat content flux (W/m2) 
     297            zqlatisf3d(:,:,:)= 0.0_wp                         ! 3d ice shelf melting latent heat flux (W/m2) 
     298            zqhcisf2d(:,:)   = fwfisf(:,:) * zt_frz * rcp     ! 2d heat content flux (W/m2) 
     299 
     300            DO jj = 1,jpj 
     301               DO ji = 1,jpi 
     302                  ikt = misfkt(ji,jj) 
     303                  ikb = misfkb(ji,jj) 
     304                  DO jk = ikt, ikb - 1 
     305                     zfwfisf3d (ji,jj,jk) = zfwfisf3d (ji,jj,jk) + fwfisf   (ji,jj) * r1_hisf_tbl(ji,jj) * fse3t(ji,jj,jk) 
     306                     zqhcisf3d (ji,jj,jk) = zqhcisf3d (ji,jj,jk) + zqhcisf2d(ji,jj) * r1_hisf_tbl(ji,jj) * fse3t(ji,jj,jk) 
     307                     zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf     (ji,jj) * r1_hisf_tbl(ji,jj) * fse3t(ji,jj,jk) 
     308                  END DO 
     309                  zfwfisf3d (ji,jj,jk) = zfwfisf3d (ji,jj,jk) + fwfisf   (ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * fse3t(ji,jj,jk) 
     310                  zqhcisf3d (ji,jj,jk) = zqhcisf3d (ji,jj,jk) + zqhcisf2d(ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * fse3t(ji,jj,jk) 
     311                  zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf     (ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * fse3t(ji,jj,jk) 
     312               END DO 
     313            END DO 
     314 
     315            CALL iom_put('fwfisf3d' , zfwfisf3d (:,:,:)) 
     316            CALL iom_put('qlatisf3d', zqlatisf3d(:,:,:)) 
     317            CALL iom_put('qhcisf3d' , zqhcisf3d (:,:,:)) 
     318            CALL iom_put('qhcisf'   , zqhcisf2d (:,:  )) 
     319 
     320            CALL wrk_dealloc( jpi,jpj,jpk, zfwfisf3d, zqhcisf3d, zqlatisf3d ) 
     321            CALL wrk_dealloc( jpi,jpj,     zqhcisf2d                        ) 
     322         END IF 
     323!============================================================================================================================================= 
    286324 
    287325         IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    ! 
Note: See TracChangeset for help on using the changeset viewer.