Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent data types used for axes and variables in restart files #696

Closed
DusanJovic-NOAA opened this issue Sep 13, 2023 · 0 comments · Fixed by #697
Closed

Inconsistent data types used for axes and variables in restart files #696

DusanJovic-NOAA opened this issue Sep 13, 2023 · 0 comments · Fixed by #697

Comments

@DusanJovic-NOAA
Copy link
Collaborator

The data type of axis variables in restart files is not consistent with the data type used for data variables:

$ ncdump -h control_p8_intel/RESTART/20210323.060000.fv_srf_wnd.res.tile1.nc
netcdf \20210323.060000.fv_srf_wnd.res.tile1 {
dimensions:
        xaxis_1 = 96 ;
        yaxis_1 = 96 ;
        Time = UNLIMITED ; // (1 currently)
variables:
        double xaxis_1(xaxis_1) ;
                xaxis_1:axis = "X" ;
        double yaxis_1(yaxis_1) ;
                yaxis_1:axis = "Y" ;
        double Time(Time) ;
                Time:cartesian_axis = "T" ;
                Time:units = "time level" ;
                Time:long_name = "Time" ;
        float u_srf(Time, yaxis_1, xaxis_1) ;
                u_srf:checksum = "FFFFF95324A80355" ;
        float v_srf(Time, yaxis_1, xaxis_1) ;
                v_srf:checksum = "      95502B31C2" ;

// global attributes:
                :NumFilesInSet = 1 ;
}

This happens when model is compiled using 32bit option. To make the restart files written out by the write grid component bit-identical to the restart files written out by FMS this was necessary:

https://github.com/NOAA-EMC/fv3atm/blob/develop/io/module_write_restart_netcdf.F90#L567-L573

Code that defines axis in restart files should be updated to use the same real kind for both axes and data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant