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 15411 for NEMO/branches/UKMO – NEMO

Changeset 15411 for NEMO/branches/UKMO


Ignore:
Timestamp:
2021-10-20T11:41:34+02:00 (3 years ago)
Author:
hadjt
Message:

Region means updated to calculate river and precip/evap heat flux given surface temperature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_CO9_shelf_climate/src/OCE/DIA/diaregmean.F90

    r15402 r15411  
    160160       
    161161      IF(ln_diaregmean_diasbc) THEN    
    162         ALLOCATE( tmp_field_SBC_mat(jpi,jpj,7),  STAT= ierr ) !SBC terms 
     162        ALLOCATE( tmp_field_SBC_mat(jpi,jpj,9),  STAT= ierr ) !SBC terms 
    163163            IF( ierr /= 0 )   CALL ctl_stop( 'tmp_field_SBC_mat: failed to allocate tmp_field_SBC_mat array' ) 
    164164        tmp_field_SBC_mat(:,:,:) = 0. 
     
    494494      CHARACTER (len=120), DIMENSION(19) ::    name_dat_mat 
    495495      CHARACTER (len=120), DIMENSION(4)  ::    name_AR5_mat 
    496       CHARACTER (len=120), DIMENSION(7)  ::    name_SBC_mat 
     496      CHARACTER (len=120), DIMENSION(9)  ::    name_SBC_mat 
    497497      CHARACTER (len=120), DIMENSION(4)  ::    name_HSCM_mat 
    498498      INTEGER                            ::    vi      
     
    500500      REAL(wp), DIMENSION(19)            ::    output_mulitpler_dat_mat 
    501501      REAL(wp), DIMENSION(4)             ::    output_mulitpler_AR5_mat 
    502       REAL(wp), DIMENSION(7)             ::    output_mulitpler_SBC_mat 
     502      REAL(wp), DIMENSION(9)             ::    output_mulitpler_SBC_mat 
    503503      REAL(wp), DIMENSION(4)             ::    output_mulitpler_HSVM_mat 
    504504 
     
    691691            tmp_field_SBC_mat(:,:,7) = tmp_field_SBC_mat(:,:,7) + (rnf*tmask(:,:,1)) 
    692692            name_SBC_mat(7) = 'rnf' 
     693 
     694            tmp_field_SBC_mat(:,:,8) = tmp_field_SBC_mat(:,:,8) + (emp*tmask(:,:,1)*tsn(:,:,1,jp_tem)*3850.) 
     695            name_SBC_mat(8) = 'empheat' 
     696            tmp_field_SBC_mat(:,:,9) = tmp_field_SBC_mat(:,:,9) + (rnf*tmask(:,:,1)*tsn(:,:,1,jp_tem)*3850.) 
     697            name_SBC_mat(9) = 'rnfheat' 
     698 
    693699        ENDIF 
    694700 
     
    723729                   IF (iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_ave'))))    .OR. & 
    724730                     & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_tot'))))    .OR. & 
     731                     & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_totheat'))))    .OR. & 
    725732                     & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_var'))))    .OR. & 
    726733                     & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_cnt'))))    .OR. & 
     
    746753                IF (iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_ave'))))    .OR. & 
    747754                  & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_tot'))))    .OR. & 
     755                  & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_totarea'))))    .OR. & 
    748756                  & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_var'))))    .OR. & 
    749757                  & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_cnt'))))    .OR. & 
     
    763771                    IF (iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_ave'))))    .OR. & 
    764772                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_tot'))))    .OR. & 
     773                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_totarea'))))    .OR. & 
    765774                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_var'))))    .OR. & 
    766775                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_cnt'))))    .OR. & 
     
    776785 
    777786            IF( ln_diaregmean_diasbc  ) THEN 
    778                 DO vi=1,7 ! State loop 
     787                DO vi=1,9 ! State loop 
    779788 
    780789                    tmp_name=TRIM( name_SBC_mat(vi) ) 
    781790                    IF (iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_ave'))))    .OR. & 
    782791                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_tot'))))    .OR. & 
     792                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_totarea'))))    .OR. & 
    783793                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_var'))))    .OR. & 
    784794                      & iom_use(trim( trim(trim("reg_") // trim(tmp_name) // trim('_cnt'))))    .OR. & 
     
    11221132          !ENDIF 
    11231133           
    1124           !calculate the mean and variance from the total, sum of squares and the count.  
     1134          ! calculate the mean and variance from the total, sum of squares and the count.  
    11251135          ! When area weighting, you can't area weight the total. 
    11261136          ! this if block may be redundant, as totarea_mat == tot_mat, and cnt_mat == area_mat when ln_diaregmean_areawgt == False 
Note: See TracChangeset for help on using the changeset viewer.