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 13998 for NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/IOM/iom.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T14:55:21+01:00 (3 years ago)
Author:
techene
Message:

branch updated with trunk 13787

Location:
NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@13292        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/IOM/iom.F90

    r13512 r13998  
    123123      REAL(wp), DIMENSION(2,jpkam1)         :: za_bnds   ! ABL vertical boundaries 
    124124      LOGICAL ::   ll_closedef = .TRUE. 
     125      LOGICAL ::   ll_exist 
    125126      !!---------------------------------------------------------------------- 
    126127      ! 
     
    235236          CALL iom_set_axis_attr( "ghw_abl", bounds=za_bnds ) 
    236237 
    237           CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 
     238          CALL iom_set_axis_attr(  "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 
    238239# if defined key_si3 
    239240          CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) ) 
     
    248249          CALL iom_set_axis_attr( "iax_26C", (/ REAL(26,wp) /) )   ! strange syntaxe and idea... 
    249250          CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) )   ! strange syntaxe and idea... 
    250           CALL iom_set_axis_attr( "basin"  , (/ (REAL(ji,wp), ji=1,5) /) ) 
     251          ! for diaprt, we need to define an axis which size can be 1 (default) or 5 (if the file subbasins.nc exists) 
     252          INQUIRE( FILE = 'subbasins.nc', EXIST = ll_exist ) 
     253          nbasin = 1 + 4 * COUNT( (/ll_exist/) ) 
     254          CALL iom_set_axis_attr( "basin"  , (/ (REAL(ji,wp), ji=1,nbasin) /) ) 
    251255      ENDIF 
    252256      ! 
     
    355359           rst_file = TRIM(clpath)//TRIM(cn_ocerst_in) 
    356360        ELSE 
    357            rst_file = TRIM(clpath)//'1_'//TRIM(cn_ocerst_in) 
     361           rst_file = TRIM(clpath)//TRIM(Agrif_CFixed())//'_'//TRIM(cn_ocerst_in) 
    358362        ENDIF 
    359363!set name of the restart file and enable available fields 
     
    19151919      IF( iom_use(cdname) ) THEN 
    19161920#if defined key_iomput 
    1917          IF( SIZE(pfield2d, dim=1) == jpi .AND. SIZE(pfield2d, dim=2) == jpj ) THEN 
    1918             CALL xios_send_field( cdname, pfield2d(Nis0:Nie0, Njs0:Nje0) )       ! this extraction will create a copy of pfield2d 
    1919          ELSE 
    1920             CALL xios_send_field( cdname, pfield2d ) 
    1921          ENDIF 
     1921         CALL xios_send_field( cdname, pfield2d ) 
    19221922#else 
    19231923         WRITE(numout,*) pfield2d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    19311931      IF( iom_use(cdname) ) THEN 
    19321932#if defined key_iomput 
    1933          IF( SIZE(pfield2d, dim=1) == jpi .AND. SIZE(pfield2d, dim=2) == jpj ) THEN 
    1934             CALL xios_send_field( cdname, pfield2d(Nis0:Nie0, Njs0:Nje0) )       ! this extraction will create a copy of pfield2d 
    1935          ELSE 
    1936             CALL xios_send_field( cdname, pfield2d ) 
    1937          ENDIF 
     1933         CALL xios_send_field( cdname, pfield2d ) 
    19381934#else 
    19391935         WRITE(numout,*) pfield2d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    19471943      IF( iom_use(cdname) ) THEN 
    19481944#if defined key_iomput 
    1949          IF( SIZE(pfield3d, dim=1) == jpi .AND. SIZE(pfield3d, dim=2) == jpj ) THEN 
    1950             CALL xios_send_field( cdname, pfield3d(Nis0:Nie0, Njs0:Nje0,:) )     ! this extraction will create a copy of pfield3d 
    1951          ELSE 
    1952             CALL xios_send_field( cdname, pfield3d ) 
    1953          ENDIF 
     1945         CALL xios_send_field( cdname, pfield3d ) 
    19541946#else 
    19551947         WRITE(numout,*) pfield3d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    19631955      IF( iom_use(cdname) ) THEN 
    19641956#if defined key_iomput 
    1965          IF( SIZE(pfield3d, dim=1) == jpi .AND. SIZE(pfield3d, dim=2) == jpj ) THEN 
    1966             CALL xios_send_field( cdname, pfield3d(Nis0:Nie0, Njs0:Nje0,:) )     ! this extraction will create a copy of pfield3d 
    1967          ELSE 
    1968             CALL xios_send_field( cdname, pfield3d ) 
    1969          ENDIF 
     1957         CALL xios_send_field( cdname, pfield3d ) 
    19701958#else 
    19711959         WRITE(numout,*) pfield3d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    19791967      IF( iom_use(cdname) ) THEN 
    19801968#if defined key_iomput 
    1981          IF( SIZE(pfield4d, dim=1) == jpi .AND. SIZE(pfield4d, dim=2) == jpj ) THEN 
    1982             CALL xios_send_field( cdname, pfield4d(Nis0:Nie0, Njs0:Nje0,:,:) )   ! this extraction will create a copy of pfield4d 
    1983          ELSE 
    1984             CALL xios_send_field (cdname, pfield4d ) 
    1985          ENDIF 
     1969         CALL xios_send_field (cdname, pfield4d ) 
    19861970#else 
    19871971         WRITE(numout,*) pfield4d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    19951979      IF( iom_use(cdname) ) THEN 
    19961980#if defined key_iomput 
    1997          IF( SIZE(pfield4d, dim=1) == jpi .AND. SIZE(pfield4d, dim=2) == jpj ) THEN 
    1998             CALL xios_send_field( cdname, pfield4d(Nis0:Nie0, Njs0:Nje0,:,:) )   ! this extraction will create a copy of pfield4d 
    1999          ELSE 
    2000             CALL xios_send_field (cdname, pfield4d ) 
    2001          ENDIF 
     1981         CALL xios_send_field (cdname, pfield4d ) 
    20021982#else 
    20031983         WRITE(numout,*) pfield4d   ! iom_use(cdname) = .F. -> useless test to avoid compilation warnings 
     
    22052185      ! 
    22062186      CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=Ni0glo,nj_glo=Nj0glo,ibegin=mig0(Nis0)-1,jbegin=mjg0(Njs0)-1,ni=Ni_0,nj=Nj_0) 
    2207       CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 0, data_ni = Ni_0, data_jbegin = 0, data_nj = Nj_0) 
     2187      CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = -nn_hls, data_ni = jpi, data_jbegin = -nn_hls, data_nj = jpj) 
    22082188!don't define lon and lat for restart reading context.  
    22092189      IF ( .NOT.ldrxios ) & 
     
    23042284      CALL dom_ngb( 180.0_wp, 90.0_wp, ix, iy, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots) 
    23052285      CALL iom_set_domain_attr("gznl", ni_glo=Ni0glo, nj_glo=Nj0glo, ibegin=mig0(Nis0)-1, jbegin=mjg0(Njs0)-1, ni=Ni_0, nj=Nj_0) 
    2306       CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 0, data_ni = Ni_0, data_jbegin = 0, data_nj = Nj_0) 
     2286      CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = -nn_hls, data_ni = jpi, data_jbegin = -nn_hls, data_nj = jpj) 
    23072287      CALL iom_set_domain_attr("gznl", lonvalue = real(zlon, dp),   & 
    23082288         &                             latvalue = real(RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp))   
    2309       CALL iom_set_zoom_domain_attr("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=Nj_0) 
     2289      CALL iom_set_zoom_domain_attr("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=Nj0glo) 
    23102290      ! 
    23112291      CALL iom_update_file_name('ptr') 
Note: See TracChangeset for help on using the changeset viewer.