ep2764@columbia_edu
Member
I am trying to port my code modifications from cesm1.0.4 to cesm1.2.2 on pleiades-san. In this mod I used commands from the file .../models/atm/cam/src/control/wrap_nf.F90. It used to work, but now crashes during compiling when I try to read in 3 dimensional variable. I noticed at the top of the wrap_nf.F90 file that there is the following message:
!-------------------------------------------------------------------------------
!
! WARNING: USE OF THIS MODULE WITHIN CAM IS DEPRECATED. ALL
! HANDLING OF NETCDF FILES SHOULD ULTIMATELY BE DONE
! BY PIO, OR FOR PORTABLE CODE, SHOULD CONTACT THE
! NETCDF F90 INTERFACE DIRECTLY.
!
! DO NOT USE THIS MODULE.
!
!-------------------------------------------------------------------------------
As such, I think I should update my code to not use this module. What is the best way to read in netcdf variables without using this module. I assume this is done somewhere else in the model, so if someone could direct me to where that occurs, I can use it as an example. Thank you for your assistance.
For the record the error I am getting right now is:
/u/epeck/case/sdwaccm_codrescu_1_2_2/SourceMods/src.cam/mo_epp.F90(154): error #6634: The shape matching rules of actual arguments and dummy arguments have been violated. [EPP_MEPED_ALPHA]
call wrap_get_var_realx(fid, alpha_vid, epp_meped_alpha)
------------------------------------------------^
Relevant lines of code that lead up to this error are:
use wrap_nf, only: wrap_inq_varid, wrap_get_var_int, wrap_get_var_realx, wrap_close, wrap_open, wrap_inq_dimid, wrap_inq_dimlen
...
...
real(r8), allocatable, dimension(:,:,:) :: epp_meped_alpha
...
...
allocate(epp_meped_alpha(epp_meped_nLevs, epp_meped_nLats, epp_meped_nMLTs))
...
...
call wrap_inq_varid(fid, 'energy', alpha_vid)
call wrap_get_var_realx(fid, alpha_vid, epp_meped_alpha)
I should note that I use these same commands for some 1dim vectors, and the compiler gives me no issues.
Any advice I can get to deal with this would be great! Thank you!
-Ethan
!-------------------------------------------------------------------------------
!
! WARNING: USE OF THIS MODULE WITHIN CAM IS DEPRECATED. ALL
! HANDLING OF NETCDF FILES SHOULD ULTIMATELY BE DONE
! BY PIO, OR FOR PORTABLE CODE, SHOULD CONTACT THE
! NETCDF F90 INTERFACE DIRECTLY.
!
! DO NOT USE THIS MODULE.
!
!-------------------------------------------------------------------------------
As such, I think I should update my code to not use this module. What is the best way to read in netcdf variables without using this module. I assume this is done somewhere else in the model, so if someone could direct me to where that occurs, I can use it as an example. Thank you for your assistance.
For the record the error I am getting right now is:
/u/epeck/case/sdwaccm_codrescu_1_2_2/SourceMods/src.cam/mo_epp.F90(154): error #6634: The shape matching rules of actual arguments and dummy arguments have been violated. [EPP_MEPED_ALPHA]
call wrap_get_var_realx(fid, alpha_vid, epp_meped_alpha)
------------------------------------------------^
Relevant lines of code that lead up to this error are:
use wrap_nf, only: wrap_inq_varid, wrap_get_var_int, wrap_get_var_realx, wrap_close, wrap_open, wrap_inq_dimid, wrap_inq_dimlen
...
...
real(r8), allocatable, dimension(:,:,:) :: epp_meped_alpha
...
...
allocate(epp_meped_alpha(epp_meped_nLevs, epp_meped_nLats, epp_meped_nMLTs))
...
...
call wrap_inq_varid(fid, 'energy', alpha_vid)
call wrap_get_var_realx(fid, alpha_vid, epp_meped_alpha)
I should note that I use these same commands for some 1dim vectors, and the compiler gives me no issues.
Any advice I can get to deal with this would be great! Thank you!
-Ethan