Hi OpenIFS team,

I would like to be able to output the streamfunction and velocity potential from OpenIFS (instead of or as well as the divergence and vorticity).

Unfortunately the GRIB codes for streamfn and vel.pot. (1 & 2) are not in the list of OpenIFS output variables given in the user guide.

Is it possible to output these from the model? I've looked through the model code and I can see mention of these variables but when I try adding the GRIB codes to the NAMFPC namelist, they are not output.

Thanks,   

     RH

5 Comments

  1. Unknown User (nagc)

    Hi Ryan,

    As you have found, if a GRIB code is specified in the namelist that the model doesn't know about, it will ignore it and no output is produced.

    I have checked with one of my colleagues. We think it should be possible to turn on vel. Pot. & streamfn output. It looks as if the code exists but the output has been used for other fields. So we need to change the code to put back streamfn & potential output.

    In the model ‘src’ directory, go to ifs/setup and edit suafn1.F90 (make a backup copy first!).

    Go to lines 456:457

        456   TFP_KHI =TFP_SU(LLF,YFAKHI%CLNAME     ,NGRBHTCC,  IS,IG,12,LLF  ,I1,Z0,0,'VPSF')

        457   TFP_PSI =TFP_SU(LLF,YFAPSI%CLNAME     ,NGRBVDH,  IS,IG,12,LLF  ,I1,Z0,0,'VPSF')

    This sets up the data structure for KHI & PSI output, the vel. Pot. & streamfunction. But you’ll notice that the grib codes passed, NGRBHTCC and NGRBVDH, are not correct. They are humidity related fields.

    We think these two lines need to be edited with the correct name and grib codes like this:

        456   TFP_KHI =TFP_SU(LLF,’VELOCITY POTENTIAL’, 1,  IS,IG,12,LLF  ,I1,Z0,0,'VPSF')

        457   TFP_PSI =TFP_SU(LLF,’STREAMFUNCTION’    , 2,  IS,IG,12,LLF  ,I1,Z0,0,'VPSF')

    It’s possible there is another part of the model code that needs changing but I’ve checked and I think this is all. Make the change and then make sure you recompile the model and use the new executable in place of the original one. And remember to add the grib codes ‘1’ and ‘2’ to the NAMFPC namelist output in either model or pressure levels.

    Do not change the similar lines around line 800 in suafn1.F90. That part of the code is for the MeteoFrance version of the model. The earlier lines I’m referring to are under an ‘IF (LECMWF..) logical and only used at ECMWF.

    Let me know what happens! 

     

    Best regards,    Glenn

  2. Unknown User (gdcarver113@outlook.com)

    Thanks, that worked perfectly!

    I was wondering if the same trick would work for grib codes 11-14: wind components of divergent and rotational flow?

      RH.

    1. Unknown User (nagc)

      You can try it but I don't think they will work. I don't see mention of those variables in the code. If the FULLPOS diagnostics code knows how to compute them it will work, otherwise the grib codes will be ignored if you specify them on the namelists.

      Glenn

  3. Unknown User (gdcarver113@outlook.com)

    I already tried them, but as you correctly said, they do not produce any output.

    Streamfunction & velocity potential output works fine with those code changes, thanks for your help.

      RH.

  4. Hi Glenn,

    I have a question about this.

    I have checked that NGRBHTCC  and NGRBVDH are 225 and 224.  at the meantime, there are no other codes use them.

    Why do we need to change them? Why don't we use them in the NAMFPC namelist output? 

    Thanks.