Opened 8 years ago

Closed 8 years ago

Last modified 2 years ago

#943 closed Defect (fixed)

output files are not netcdf4 as expected

Reported by: rkandilarov Owned by: acc
Priority: low Milestone: Unscheduled
Component: OCE Version: release-3.4
Severity: Keywords: NetCDF*
Cc:

Description

Hello guys!

I'm using Revision: 3321 (nemo_v3_4) and it seems that:

  • In contrast to the documentation I can link NEMO to !NetCdf4 libs and produce netcdf classic files without using key_netcdf4
  • When I link to !NetCdf4 (4.1.3 or 4.2) and define key_netcdf4 when running opa I get only the restart file as hdf(nc4) type but the U,V,T and W files are still nc3 (classic).

Another problem (wich is probably for separated ticket):

Here is my test configuration:

makenemo -r GYRE -n TEST2_nc4.2_hdf5 -m ifort_nc4.2_debug -j 6 add_key "key_netcdf4"

and my ifort_nc4.2_debug file:

%SZIP /usr/opt/szip/intel/12.1.1.256/2.1       

%ZLIB /usr/opt/zlib/intel/12.1.1.256/1.2.6
%HDF5 /usr/opt/hdf5/intel/12.1.1.256/1.8.8_sz2.1_z1.2.6       %NETCDF_C /usr/opt/netcdf/intel/12.1.1.256/4.2_hdf5-1.8.8_sz2.1_z1.2.6 
%NETCDF_F /usr/opt/netcdf-fortran/intel/12.1.1.256/4.2_netcdf-4.2_hdf5-1.8.8_sz2.1_z1.2.6                                             
%NCDF_INC            -I%SZIP/include -I%ZLIB/include -I%HDF5/include -I%NETCDF_C/include -I%NETCDF_F/include
        
%NCDF_LIB            -L%NETCDF_C/lib -L%NETCDF_F/lib -L%HDF5/lib -L%ZLIB/lib -L%SZIP/lib  -Wl,--start-group -lnetcdff -lnetcdf -lhdf5 -lhdf5_fortran -lhdf5_hl -lz -lsz -Wl,--end-group                                       
%FC                  ifort                                       
%FCFLAGS             -r8 -g -traceback                           
%FFLAGS              %FCFLAGS                                    
%LD                  ifort                                       
%FPPFLAGS            -P -C -traditional                          
%LDFLAGS             -static                                       
%AR                  ar                                          
%ARFLAGS             -r                                          
%MK                  make                                        
%USER_INC            %NCDF_INC
%USER_LIB            %NCDF_LIB 

Commit History (1)

ChangesetAuthorTimeChangeLog
3345acc2012-04-04T17:37:22+02:00

trunk bugfix for #943. Reinstating changes to XMLIO_SERVER module (mod_interface_ioipsl.f90) to ensure netcdf4 files are produced when requested. Prior to this fix, v3.4 would produce netCDF-3 mean files regardless of logical flags when key_iomput was used with key_netcdf4

Change History (11)

comment:1 in reply to: ↑ description Changed 8 years ago by rkandilarov

Some more information.

When removing the key_iomput (which selcelts probably the old iom library) I got netcdf4 files as expected.

I also found that in this ticket http://forge.ipsl.jussieu.fr/nemo/ticket/372 there is a solution for the feature that I was using in the previous versions and missing in v3_4:  my "flush" is the call of nf90_sync after each write, will try to add it by myslef.

comment:2 Changed 8 years ago by acc

  • Owner changed from NEMO team to acc
  • Status changed from new to assigned

Yes there is an error here. Some changes have gone missing from NEMOGCM/EXTERNAL/XMLIO_SERVER/src/IOSERVER/mod_interface_ioipsl.f90
(probably during last year's merge?). The omission means users of key_iomput will get netcdf-3 mean files with or without key_netcdf4 .Reinstatement on the trunk can be discussed at the next system team meeting on Wednesday.
Meanwhile anyone starting a new run can just change the 4 lines indicated here to get netcdf4 working again
with key_iomput:

Index: mod_interface_ioipsl.f90
===================================================================
--- mod_interface_ioipsl.f90    (revision 3334)
+++ mod_interface_ioipsl.f90    (working copy)
@@ -37,6 +37,7 @@
   SUBROUTINE Create_file_definition(nb_server,server_rank)
   USE ioipsl
   USE xmlio
+  USE mod_ioserver_namelist
   IMPLICIT NONE
     INTEGER,INTENT(IN)  :: nb_server
     INTEGER,INTENT(IN)  :: server_rank
@@ -87,14 +88,14 @@
             CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 
                        pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,         &
                        initial_timestep, initial_date, timestep_value,                               &
-                       ioipsl_hori_id, ioipsl_file_id)
+                       ioipsl_hori_id, ioipsl_file_id, snc4chunks=snc4ioset)
            ELSE                                              
 
             CALL set_ioipsl_domain_id(pt_grid,nb_server,server_rank,ioipsl_domain_id)
             CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat,  &
                        pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,          &
                        initial_timestep, initial_date, timestep_value,                                &
-                       ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id)                                              
+                       ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id, snc4chunks=snc4ioset)                                              
           
            ENDIF
         
@@ -141,7 +142,7 @@
                          & real(pt_file%output_freq) )
             ENDIF
           ENDDO
-          CALL histend(ioipsl_file_id)
+          CALL histend(ioipsl_file_id, snc4chunks=snc4ioset)
         ENDIF
         CALL sorted_list__delete(axis_id)
       ENDIF

comment:3 Changed 8 years ago by rkandilarov

Great!

It worked for me:).

comment:4 Changed 8 years ago by acc

  • Resolution set to fixed
  • Status changed from assigned to closed

Fix now committed to the trunk. Please be aware the default behaviour for the reference configurations will be changed when compiled with key_netcdf4. Prior to this fix the
v3.4 reference configurations (which use key_iomput) will have been producing netCDF-3 format mean files even when key_netcdf4 was active.
These changes reactivate the functionality first introduced in v3.3 and allow netCDF-4 mean files to be produced on request.

Fix committed at revision 3345

comment:5 Changed 4 years ago by nicolasmartin

  • Keywords NetCDF4 added; netcdf4 removed

comment:6 Changed 4 years ago by nicolasmartin

  • Keywords nemo_v3_4* added

comment:7 Changed 4 years ago by nicolasmartin

  • Keywords NetCDF* added; NetCDF4 removed

comment:8 Changed 2 years ago by nemo

  • Keywords Misc. added

comment:9 Changed 2 years ago by nemo

  • Keywords release-3.4* added; nemo_v3_4* removed

comment:10 Changed 2 years ago by nemo

  • Keywords release-3.4* removed

comment:11 Changed 2 years ago by nemo

  • Keywords Misc. removed
Note: See TracTickets for help on using tickets.