[MITgcm-devel] diagnostics subdirectories
Daiwei (David) Wang
daiwei at MIT.EDU
Thu Aug 18 11:00:15 EDT 2011
Hi Martin,
Thanks for your comment. It was a quick hack since I use
useSingleCpuIO=.T.. It definitely works for per-tile output as well
except when mdsioLocalDir is not empty, in which case, the model creates
a subdirectories for each tile and one would need to create diagnostic
directories inside these subdirectories. I didn't consider this scenario
then, which however is probably not so hard to be included.
David
On 8/18/11 5:12 AM, Martin Losch wrote:
> Hi David,
>
> I think that this can be useful for orginizing the many output files, but why do you need this:
>> .AND.
>> & (globalFiles .OR. useSingleCpuIO)
> ?
>
> M.
>
> On Aug 9, 2011, at 4:34 PM, Daiwei (David) Wang wrote:
>
>> Hi,
>>
>> I made some changes to diagnostics_readparms.F so that the model has the option to save each diagnostic stream in a separate subdirectory instead of the current run directory, meaning the output is more organized if there are more than a few diagnostic streams. The code is simple and follows the treatment of mdsioLocalDir:
>>
>> IF ( createDiagDir . AND. diag_mdsio .AND.
>> & (globalFiles .OR. useSingleCpuIO) ) THEN
>> WRITE(namBuf,'(2A)') ' mkdir -p ', fnames(n)
>> pIL = 1 + ILNBLNK( namBuf )
>> CALL SYSTEM( namBuf(1:pIL) )
>> namBuf(1:iLen) = fnames(n)(1:iLen)
>> WRITE(fnames(n),'(3A)') namBuf(1:iLen),'/',namBuf(1:iLen)
>> ENDIF
>>
>> When createDiagDir is true, instead of saving, say, THETA.*.data, the model will create a subdirectory THETA and save the output as THETA/THETA.*.data.
>>
>> Do you think this is a useful option? I'm attaching the modified code.
>>
>> Thanks,
>> David
>> <diagnostics_readparms.F><DIAGNOSTICS.h>_______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
--
Daiwei Wang, Postdoctoral Associate
54-1517, Program in Atmospheres, Oceans, and Climate
Department of Earth, Atmospheric and Planetary Sciences
Massachusetts Institute of Technology
More information about the MITgcm-devel
mailing list