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 7587 – NEMO

Changeset 7587


Ignore:
Timestamp:
2017-01-20T16:17:56+01:00 (7 years ago)
Author:
acc
Message:

Branch dev_merge_2016. Added the writing and reading of attributes to the domain configuration (cfg_write and cfg_read in domain.F90). As an example, the domain configuration files now include the cn_cfg and nn_cfg values as attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r7514 r7587  
    517517      ii = 1 
    518518      WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    519       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in', TRIM( cn_domcfg ), ' file'   ;   ii = ii+1 
     519      WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'   ;   ii = ii+1 
    520520      WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
    521521      ! 
     
    536536         cd_cfg = 'UNKNOWN' 
    537537         kk_cfg = -9999999 
     538                                          !- or they may be present as global attributes  
     539                                          !- (netcdf only)   
     540         IF( iom_file(inum)%iolib == jpnf90 ) THEN 
     541            CALL iom_getatt( inum, 'cn_cfg', cd_cfg )  ! returns   !  if not found 
     542            CALL iom_getatt( inum, 'nn_cfg', kk_cfg )  ! returns -999 if not found 
     543            IF( TRIM(cd_cfg) .EQ. '!') cd_cfg = 'UNKNOWN' 
     544            IF( kk_cfg .EQ. -999     ) kk_cfg = -9999999 
     545         ENDIF 
     546         ! 
    538547      ENDIF 
    539548      ! 
     
    669678      ENDIF 
    670679      ! 
     680      ! Add some global attributes ( netcdf only ) 
     681      IF( iom_file(inum)%iolib == jpnf90 ) THEN 
     682         CALL iom_putatt( inum, 'nn_cfg', nn_cfg ) 
     683         CALL iom_putatt( inum, 'cn_cfg', TRIM(cn_cfg) ) 
     684      ENDIF 
     685      ! 
    671686      !                                ! ============================ 
    672687      !                                !        close the files  
Note: See TracChangeset for help on using the changeset viewer.