Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

CESM 1.2 fails while writing monthly POP2 output file

Hi,I'm getting the following error while POP2 tries to write monthly output file.forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable TAVG_MOC_G when it is not allocatedHow to fix this issue?  
 

jet

Member
Hi:Not all compilers will flag this.  I think the issue is that this array is only really used and allocated on the root processor for IO.  Because all the processors list it as being an allocatable array it must be allocated on those processors as well. It is all right to allocate a small version of this array on those other processors.  You would use a construct like this:     if ( my_task == ioroot ) then       allocate (TAVG_MOC_G(n_lat_aux_grid+1,km+1,n_moc_comp,n_transport_reg))     else       allocate (TAVG_MOC_G(1, 1, 1, 1))     endif Could you try this and see if it works for your case?  I believe there are other instances of this 
 

jet

Member
Hi:Not all compilers will flag this.  I think the issue is that this array is only really used and allocated on the root processor for IO.  Because all the processors list it as being an allocatable array it must be allocated on those processors as well. It is all right to allocate a small version of this array on those other processors.  You would use a construct like this:     if ( my_task == ioroot ) then       allocate (TAVG_MOC_G(n_lat_aux_grid+1,km+1,n_moc_comp,n_transport_reg))     else       allocate (TAVG_MOC_G(1, 1, 1, 1))     endif Could you try this and see if it works for your case?  I believe there are other instances of this 
 

jet

Member
Hi:Not all compilers will flag this.  I think the issue is that this array is only really used and allocated on the root processor for IO.  Because all the processors list it as being an allocatable array it must be allocated on those processors as well. It is all right to allocate a small version of this array on those other processors.  You would use a construct like this:     if ( my_task == ioroot ) then       allocate (TAVG_MOC_G(n_lat_aux_grid+1,km+1,n_moc_comp,n_transport_reg))     else       allocate (TAVG_MOC_G(1, 1, 1, 1))     endif Could you try this and see if it works for your case?  I believe there are other instances of this 
 
Yes, it worked. I have modified the program (diags_on_lat_aux_grid.F90) as you suggested.I have made the similar modification for other three variable too; TAVG_N_HEAT_TRANS_G, TAVG_N_SALT_TRANS_G, and TR_TRANS_G. Thank you
 
Yes, it worked. I have modified the program (diags_on_lat_aux_grid.F90) as you suggested.I have made the similar modification for other three variable too; TAVG_N_HEAT_TRANS_G, TAVG_N_SALT_TRANS_G, and TR_TRANS_G. Thank you
 
Yes, it worked. I have modified the program (diags_on_lat_aux_grid.F90) as you suggested.I have made the similar modification for other three variable too; TAVG_N_HEAT_TRANS_G, TAVG_N_SALT_TRANS_G, and TR_TRANS_G. Thank you
 
Top